tybro0103
tybro0103

Reputation: 49713

Boot rails 3.1 in different environment

Trying to boot a Rails 3.1 app locally in production mode.

rails s

will boot into development just fine. When I try

rails s production

I get the error:

/usr/local/Cellar/ruby/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.4/lib/rack/handler.rb:63:in
  `require': no such file to load -- rack/handler/production (LoadError)
      from /usr/local/Cellar/ruby/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-1.3.4/lib/rack/handler.rb:63:in `try_require'

Upvotes: 25

Views: 6444

Answers (1)

tybro0103
tybro0103

Reputation: 49713

Apparently the correct command is

rails s -e production

Correct me if I'm wrong, but I believe the "-e" wasn't previously required.

Upvotes: 69

Related Questions