RoR2.8 & Heroku: I installed a plugin, works locally, now heroku doesn't work at all

假装没事ソ 提交于 2019-12-11 03:46:18

问题


heroku logs brings up:

==> 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

the plugin I installed

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

I ran the migrations both locally, and on Heroku... I don't get this error locally... so.. any on the problem? I don't use any files in my app... so this confuses me.

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'

回答1:


Turned out, I just needed to delete the models that rails-ckeditor created, as well as the migration file...

I'm not using files for this project, and they were screwy anyway. so.. problem solved.




回答2:


have you restarted the server on the heroku side? Also, has_attached_file, is that a paperclip method?

Update:

Can you run searchlogic on heroku like that? I thought they wanted you to use their add-ons for searching? I'm just trying to help debug, i don't know the answer.

Also, why does searchlogic need a paperclip method? are you searching images in your heroku app?

Update 2:

What's on this line of the file:

app/models/ckeditor/attachment_file.rb:2

Please paste that file into your stack. Or the first few lines anyways. (why does ckeditor have it's own directory?)



来源:https://stackoverflow.com/questions/5206276/ror2-8-heroku-i-installed-a-plugin-works-locally-now-heroku-doesnt-work-at

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!