views:

50

answers:

1

The forms I know of are:

For Rails 3.0:

for rails server:

rails server -e production 

for rails console

rails console production

for rake

rake db:migrate RAILS_ENV=production

Is that it? I know for rails runner and rails dbconsole, it is -e production as well. Are there more forms and what are other ones that use -e vs just the name or needing RAILS_ENV?

As a sidenote, why so complicated; is it to increase the difficulty so as to embrace the power and charge higher fees in consulting? (just as why in school they teach you to use simple words to get the idea across but in the real world, people use tough words to gain power.)

+1  A: 

You don't say what platform you're using, but on a *nix machine, if you'd like to be consistent, there is always:

RAILS_ENV=test rails server

or whatever command you like.

As for reasons behind the inconsistencies, I don't think you need to look any further than developer taste, laziness, etc.

kwerle
so in Bash (for Linux and Mac OS X), you can alway do the way you mentioned? So the special cases are for Windows then. I used to believe more, thinking the salesperson who told you extended warranty is very important for your desktop / notebook is really thinking about you, or the real estate agent who represent you is to get you the best price. But in this current era, it is harder to trust than some time before.
動靜能量