RoR2.8& Heroku:我安装了一个插件,在本地工作,现在heroku根本不起作用

时间:2011-03-05 19:36:33

标签: ruby-on-rails ruby heroku ruby-on-rails-plugins

heroku日志启动:

==> dyno-3334279.log (crash) <==
/app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/conditions.rb:81:in `method_missing': undefined method `has_attached_file' for #<Class:0x2baaa6077e58> (NoMethodError)
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/association_conditions.rb:19:in `method_missing'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/association_ordering.rb:27:in `method_missing'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/ordering.rb:30:in `method_missing'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/searchlogic-2.4.19/lib/searchlogic/named_scopes/or_conditions.rb:28:in `method_missing'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1994:in `method_missing'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/app/models/ckeditor/attachment_file.rb:2
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:158:in `require'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:265:in `require_or_load'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:224:in `depend_on'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:136:in `require_dependency'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rails-2.3.8/lib/initializer.rb:414:in `load_application_classes'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rails-2.3.8/lib/initializer.rb:413:in `each'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rails-2.3.8/lib/initializer.rb:413:in `load_application_classes'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rails-2.3.8/lib/initializer.rb:411:in `each'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rails-2.3.8/lib/initializer.rb:411:in `load_application_classes'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rails-2.3.8/lib/initializer.rb:197:in `process'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/config/environment.rb:9
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:42:in `load_application'
    from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:23:in `initialize'
    from /home/heroku_rack/heroku.ru:29:in `new'
    from /home/heroku_rack/heroku.ru:29
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rack-1.1.1/lib/rack/builder.rb:46:in `instance_eval'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rack-1.1.1/lib/rack/builder.rb:46:in `initialize'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rack-1.1.1/lib/rack/builder.rb:63:in `new'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rack-1.1.1/lib/rack/builder.rb:63:in `map'
    from /home/heroku_rack/heroku.ru:18
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rack-1.1.1/lib/rack/builder.rb:46:in `instance_eval'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rack-1.1.1/lib/rack/builder.rb:46:in `initialize'
    from /home/heroku_rack/heroku.ru:11:in `new'
    from /home/heroku_rack/heroku.ru:11
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rack-1.1.1/lib/rack/builder.rb:46:in `instance_eval'
    from /app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rack-1.1.1/lib/rack/builder.rb:46:in `initialize'
    from /home/heroku_rack/heroku.ru:1:in `new'
    from /home/heroku_rack/heroku.ru:1

我安装的插件

script/plugin install git://github.com/galetahub/rails-ckeditor.git 

我在本地和Heroku上运行迁移... 我没有在本地得到这个错误...所以..问题上的任何问题? 我不在我的应用程序中使用任何文件...所以这让我感到困惑。

的Gemfile:

source :rubygems
gem 'rails', '2.3.8'
gem 'authlogic', '2.1.6'
gem 'addresslogic', '1.2.1'
gem 'searchlogic', '2.4.19'
gem 'subdomain-fu', '0.5.4'
gem 'ckeditor', '3.4.3'

2 个答案:

答案 0 :(得分:0)

您是否已在heroku端重新启动服务器?另外,has_attached_file,是一个回形针方法吗?

更新

你可以在heroku上运行searchlogic吗?我以为他们想让你用他们的附加组件进行搜索?我只是想帮助调试,我不知道答案。

另外,为什么searchlogic需要回形针方法?你在heroku应用程序中搜索图像吗?

更新2:

该文件的这一行是什么:

app/models/ckeditor/attachment_file.rb:2

请将该文件粘贴到您的堆栈中。或者反正前几行。 (为什么ckeditor有它自己的目录?)

答案 1 :(得分:0)

原来,我只需要删除rails-ckeditor创建的模型,以及迁移文件......

我没有在这个项目中使用文件,反正他们也搞砸了。所以......问题解决了。