RoR2.8& Heroku:我安装了一个插件,可以在本地运行,但现在 Heroku 根本无法运行

发布于 2024-10-20 14:51:16 字数 5458 浏览 0 评论 0原文

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 上运行了迁移...... 我在本地没有收到此错误...所以..有什么问题吗? 我的应用程序中没有使用任何文件......所以这让我很困惑。

宝石文件:

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'

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'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

动次打次papapa 2024-10-27 14:51:16

结果,我只需要删除 Rails-ckeditor 创建的模型以及迁移文件...

我没有在这个项目中使用文件,而且它们无论如何都很奇怪。所以..问题解决了。

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.

迷迭香的记忆 2024-10-27 14:51:16

你重新启动了heroku端的服务器吗?另外,has_attached_file,这是回形针方法吗?

更新:

你能像那样在heroku上运行searchlogic吗?我以为他们希望您使用他们的附加组件进行搜索?我只是想帮助调试,我不知道答案。

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

更新 2:

文件的这一行内容:

app/models/ckeditor/attachment_file.rb:2

请将该文件粘贴到堆栈中。或者无论如何,前几行。
(为什么ckeditor有它自己的目录?)

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?)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文