1

I am executing the following command:

cap staging assets:precompile

How do I access the variable env in my Capistrano deploy.rb?

where env is equal to 'staging' in this case?

4

1 回答 1

2

您可以在字符串中使用fetch(:stage)or #{stage},例如:

  task :sunspot_stop do
      run "cd #{current_path} && bundle exec rake sunspot:solr:stop RAILS_ENV=#{stage}"
  end
于 2014-03-06T22:02:08.643 回答