문제

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?

도움이 되었습니까?

해결책

You can use fetch(:stage) or #{stage} in a string for example like this:

  task :sunspot_stop do
      run "cd #{current_path} && bundle exec rake sunspot:solr:stop RAILS_ENV=#{stage}"
  end
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top