本文介绍了RoR2.8& Heroku:我安装了一个插件,在本地工作,现在,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:在`method_missing'中:未定义的方法`has_attached_file'为#< 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:在`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:在`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:在`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来自/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:from gem_original_require'
from /usr/ruby1.8.7/lib/ruby/site_ruby/ 1.8 / rubygems / custom_require.rb:31:'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:在`require_or_load'
/app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/activesupport-2.3 .8 / lib / active_support / dependencies.rb:224:在`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:在'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 `每个'
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 '从$ / b / b / b / b /
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'$ b $ /b/app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/.bundle/gems/ruby/1.8/gems/rails-2.3.8/lib/initializer .rb:113:在`run'中运行
/app/fd916ea6-bad5-440e-a560-405ef5e3beee/home/config/environment.rb:9
从/usr/ruby1.8.7/lib/ ruby / site_ruby / 1.8 / rubygems / custom_require.rb:31:在`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:在/ home / heroku_rack / heroku中初始化
。 ru:29:在`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:在`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/红宝石/ 1.8 / gems / rack-1.1.1 / lib / rack / builder.rb:63:在`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:在`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:在`initialize'
from / home / heroku_rack / heroku.ru:11:在`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:在`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'$ b / b from /home/heroku_rack/heroku.ru:1
我安装的插件
script / plugin install git://github.com/galetahub/rails-ckeditor.git
我在本地和Heroku上都运行了迁移...
我没有在本地得到这个错误...所以..有关于这个问题的任何信息?
我没有在我的应用中使用任何文件...所以这让我困惑。
gemfile:
来源: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'
解决方案
原来,我只需要删除模型,rails-ckeditor创建的,以及迁移文件...
我没有使用这个项目的文件,而且他们很烦。所以..问题解决了。
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'
解决方案
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.
这篇关于RoR2.8& Heroku:我安装了一个插件,在本地工作,现在,heroku根本不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!