Rails 3 "RAILS_ENV not defined by config/boot" error

Eric Wong normalperson at yhbt.net
Thu Feb 18 14:08:52 EST 2010

John Wulff <johnwulff at gmail.com> wrote:
> I'm running unicorn and unicorn-rails 0.96.1 and the latest Rails 3
> beta gem.  Firing up unicorn_rails spews "RAILS_ENV not defined by
> config/boot".  I know this is likely a result of RAILS_ROOT being
> deprecated in Rails 3 but I can't seem to config my way around it.
> I'm sure other people must have run into this before.  Is there a
> quick fix?

Hi John,

I haven't had a chance to look at Rails 3 yet, but you can probably try
just using a plain config.ru with "unicorn" (not "unicorn_rails")

------------------- config.ru ------------------
require "config/environment"
use Rails::Rack::Static
run ActionController::Dispatcher.new

Let us know how it goes, thanks!

Eric Wong

More information about the mongrel-unicorn mailing list