rails/rails — pull request #5550 by schneems (2012-03-22 17:29:10+00:00)
Title: Fix environment Support for rails server, and match interface of rails console

Right now when a user migrates a database and they need to specify an environment they must do it by specifying `RAILS_ENV=environment`, this also works if you are running console i.e. `rails console RAILS_ENV=production` works. However if you try to use the same syntax with `rails server` you get an error. The first commit in this pull request fixes that problem.

`rails server` also takes a `-e` option for setting environment, while `rails console` does not. The second commit in this pull request adds a `-e` option to `rails console` so anyone will be able to set environment across server and console the same way.

Added tests covering setting the environment in server and console by both `-e` and `RAILS_ENV`.