Quoting Justin James Grevich <[email protected]>: > Couldn't you also put ENV['RAILS_ENV'] ||= 'production' in > environments/production.rb and ENV['RAILS_ENV'] ||= 'development' in > environments/development.rb?
No. That line is setting the environment which is a prerequisite for reading the appropriate file in the environments directory. > > > The app I'm adding to has this line uncommented in environment.rb: > > > > > ENV['RAILS_ENV'] ||= 'production' > > > > > and the instructions at the hosting site (railsplayground.com) instruct > > > one to do this. > > > > > This means I either have to edit this file to work in development on my > > > machine, and remember to change it back before deploying, or work in > > > production mode, which is undesirable for a number of reasons. > > > > > I've not seen this on the few other servers I've dealt with. What are they > > > doing differently that requires this? Not completely sure but I would guess that unless you can alter how your railsplayground hosting starts your server, that it is safest to leave it in there. To avoid having to edit the file back again on your development copy, you could set RAILS_ENV to "development" in your environment. Something like this in your .bashrc should do the trick: export RAILS_ENV=development -- SD Ruby mailing list [email protected] http://groups.google.com/group/sdruby
