"No such file or directory" error when deploying a thin server Rails application to Heroku

After trying to switch my Rails application to a thin server using these instructions , I get this error on heroku logs

and my application won't start.

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

      

Actual error that things are facing:

No such file or directory - log /production/production.log(Errno :: ENOENT)

What do I need to do to make this go away? I even manually added an empty file to log/production/production.log

and removed the log files from .gitignore

so that it exists after clicking on Heroku and I still get the error.

If that helps, here's a repo for the site I'm working on .

+3


source to share


2 answers


Resolution: I removed the procfile (according to this , it's not necessary, just recommended for full control) and now everything works fine, Still not sure what the problem was though.



+2


source


Perhaps it is related to this issue https://github.com/ddollar/rails_log_stdout/issues/4



  • try deleting config.logger = Logger.new(STDOUT)

    in config/environment.rb

    andconfig/environments/production.rb

  • Use web: bundle exec rails server thin -p $PORT -e $RAILS_ENV

    inProcfile

+3


source







All Articles