Welcome Guest | Login

capistrano production env

I followed this tutorialhttp://www.hostingrails.com/forums/wiki_thread/46

and everything is successful.. except the fact that to make it use the production env, i have to go to current app release folder and edit the environment.rb file and uncomment this line:
# ENV['RAILS_ENV'] ||= 'production'

Is there a setting in capistrano 2.0 to avoid manually commenting this code everytime?

2007-09-06 01:40 AM

You could handle this a number of ways. You could just uncomment the line in you environment.rb file, then check in the updated code to your repository and that should be fine. Another possibility would be to move the environment.rb file to the shared directory. Then in your Capfile you could have something along these lines in your restart task:

run "ln -s #{deploy_to}/shared/environment.rb #{current_path}/config/environment.rb"

2007-09-06 11:38 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.