Created
February 1, 2011 13:48
-
-
Save pierot/805874 to your computer and use it in GitHub Desktop.
Capistrano snippet to set Rails.env
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set :rails_env, "test" | |
| set :rack_env, rails_env | |
| task :setup_env do | |
| run "RACK_ENV=#{rails_env}" | |
| run "RAILS_ENV=#{rails_env}" | |
| run "echo 'RackEnv #{rails_env}' >> #{File.join(current_path, '.htaccess')}" | |
| run "echo 'RailsEnv #{rails_env}' >> #{File.join(current_path, '.htaccess')}" | |
| end | |
| task :restart, :roles => :app, :except => { :no_release => true } do | |
| deploy.setup_env | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment