【发布时间】:2014-07-15 11:05:36
【问题描述】:
在将 Heroku 应用程序从 Bamboo 迁移到 Cedar 时,我收到以下意外错误:
app[web.1]: Exiting
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/rack/log_tailer.rb:8:in `initialize'
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/server.rb:247:in `new'
app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/rack/log_tailer.rb:8:in `size': No such file or directory - log/production.log (Errno::ENOENT)
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/server.rb:247:in `block in build_app'
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/server.rb:243:in `build_app'
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/server.rb:253:in `wrapped_app'
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/server.rb:204:in `start'
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands/server.rb:65:in `start'
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands.rb:30:in `block in <top (required)>'
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands.rb:27:in `tap'
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/server.rb:243:in `reverse_each'
app[web.1]: from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands.rb:27:in `<top (required)>'
app[web.1]: from script/rails:6:in `<main>'
app[web.1]: from script/rails:6:in `require'
heroku[web.1]: State changed from starting to crashed
最重要的一行:
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/rack/log_tailer.rb:8:in `size': 没有这样的文件或目录 - 日志/生产.log (Errno::ENOENT)
- 我的源代码中没有
production.log。 - 我的
config/environments/production.rb说config.logger = Logger.new(STDOUT)。 - 我在源代码的几十个地方使用了
logger.debug。
Heroku 甚至不允许写入文件系统,所以我不知道它来自哪里。
知道如何解决吗?
【问题讨论】:
标签: ruby-on-rails heroku