Rails 应用程序的 Heroku 日志给出"require":没有这样的文件要加载 -- psych (LoadError)



我向Heroku推送了一个Rails 3.2应用程序,收到了以下错误:

app[web.1]: [2013-02-06 07:39:44] ERROR SignalException: SIGTERM
app[web.1]:   /usr/local/lib/ruby/1.9.1/webrick/server.rb:90:in `select'
heroku[web.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 10 seconds of SIGTERM
heroku[web.1]: Stopping remaining processes with SIGKILL
heroku[web.1]: Process exited with status 137
heroku[web.1]: State changed from up to down
heroku[slugc]: Slug compilation started
heroku[api]: Release v13 created by ashley@hybridgroup.com
heroku[api]: Deploy 1800efe by ashley@hybridgroup.com
heroku[web.1]: State changed from down to starting
heroku[slugc]: Slug compilation finished
heroku[web.1]: Starting process with command `bundle exec rails server -p 28816`app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml/psych_handler.rb:1:in `require': no such file to load --psych (LoadError)
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rails_admin-0.4.4/lib/rails_admin/engine.rb:11:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rails_admin-0.4.4/lib/rails_admin/engine.rb:11:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml.rb:59:in `<module:YAML>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rails_admin-0.4.4/lib/rails_admin.rb:1:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rails_admin-0.4.4/lib/rails_admin.rb:1:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml/psych_handler.rb:1:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml.rb:20:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:68:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml.rb:59:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:66:in `each'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:55:in `each'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:66:in `block in require'
app[web.1]:   from /app/config/application.rb:8:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:55:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler.rb:128:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:53:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>'
app[web.1]:   from script/rails:6:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:53:in `block in <top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap'
app[web.1]:   from script/rails:6:in `<main>'
heroku[web.1]: Process exited with status 1
heroku[web.1]: State changed from starting to crashed
heroku[web.1]: State changed from crashed to starting
heroku[web.1]: Starting process with command `bundle exec rails server -p 27035`
app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml/psych_handler.rb:1:in `require': no such file to load --psych (LoadError)
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml.rb:59:in `<module:YAML>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml.rb:20:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml.rb:59:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rails_admin-0.4.4/lib/rails_admin/engine.rb:11:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rails_admin-0.4.4/lib/rails_admin.rb:1:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:68:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/safe_yaml-0.6.3/lib/safe_yaml/psych_handler.rb:1:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rails_admin-0.4.4/lib/rails_admin/engine.rb:11:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/rails_admin-0.4.4/lib/rails_admin.rb:1:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:53:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler.rb:128:in `require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:66:in `each'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:66:in `block in require'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:55:in `each'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/bundler-1.3.0.pre.5/lib/bundler/runtime.rb:55:in `require'
app[web.1]:   from /app/config/application.rb:8:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:53:in `block in <top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:50:in `<top (required)>'
app[web.1]:   from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.11/lib/rails/commands.rb:50:in `tap'
app[web.1]:   from script/rails:6:in `require'
app[web.1]:   from script/rails:6:in `<main>'
2013-02-06T18:16:38+00:00 heroku[web.1]: Process exited with status 1

我不知道为什么它说gems在Ruby 1.9.1中,因为当我把ruby -v放在命令行中时,它说我使用的是Ruby 1.9.2,而我只安装了那个版本的Ruby。如果重要的话,我会使用Windows。我能做些什么来解决这个问题?

您的Gemfile是否将心理宝石作为依赖项?

例如

gem "psych", "~> 1.3.4"

Heroku维护一个非常特殊的堆栈。在试用我目前的一款Heroku应用程序时,我发现我默认也没有心理功能。

如果psych可用,以下命令将返回true

heroku run "ruby -e 'puts require "psych"'"

相关内容

  • 没有找到相关文章

最新更新