尝试使用these instructions将我的Rails应用切换到瘦服务器后,我在heroku logs
收到此错误,我的应用无法启动。
2012-03-12T17:00:46+00:00 heroku[web.1]: Starting process with command `bundle exec rails server thin -p 42557 -e production/production`
2012-03-12T17:00:56+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-03-12T17:00:56+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/01/04/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /app/config/environment.rb:5)
2012-03-12T17:00:56+00:00 app[web.1]: DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or
2012-03-12T17:01:00+00:00 app[web.1]: => Booting Thin
2012-03-12T17:01:00+00:00 app[web.1]: => Rails 3.2.1 application starting in production on http://0.0.0.0:42557
2012-03-12T17:01:00+00:00 app[web.1]: => Call with -d to detach
2012-03-12T17:01:00+00:00 app[web.1]: => Ctrl-C to shutdown server
2012-03-12T17:01:00+00:00 app[web.1]: Exiting
2012-03-12T17:01:00+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/log_tailer.rb:8:in `size': No such file or directory - log/production/production.log (Errno::ENOENT)
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/log_tailer.rb:8:in `initialize'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:295:in `new'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:295:in `block in build_app'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:291:in `reverse_each'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:291:in `build_app'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in `start'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in `block in <top (required)>'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
2012-03-12T17:01:00+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
2012-03-12T17:01:00+00:00 app[web.1]: from script/rails:6:in `require'
2012-03-12T17:01:00+00:00 app[web.1]: from script/rails:6:in `<main>'
2012-03-12T17:01:01+00:00 heroku[web.1]: Process exited with status 1
2012-03-12T17:01:01+00:00 heroku[web.1]: State changed from starting to crashed
破坏事物的实际错误似乎是:
没有这样的文件或目录 - log / production / production.log(Errno :: ENOENT)
我需要做些什么才能让它消失?我甚至手动在log/production/production.log
中添加了一个空文件,并从.gitignore
中删除了日志文件,以便在推送到Heroku后它会存在,我仍然会收到错误。
答案 0 :(得分:3)
可能与此问题有关 https://github.com/ddollar/rails_log_stdout/issues/4
尝试删除config.logger = Logger.new(STDOUT)
和config/environment.rb
config/environments/production.rb
在web: bundle exec rails server thin -p $PORT -e $RAILS_ENV
Procfile
醇>
答案 1 :(得分:2)
解决方案:我删除了proc文件(根据this没有必要,只是推荐用于完全控制),现在似乎工作正常。仍然不确定问题是什么。