Capistrano: Can I set an environment variable for the whole cap session?

后端 未结 5 803
遇见更好的自我
遇见更好的自我 2020-11-29 02:29

I\'ve got a staging server with both standard Ruby and Ruby Enterprise installed. As standard Ruby refuses to install a critical gem, I need to set $PATH so that ruby/gem/r

5条回答
  •  一个人的身影
    2020-11-29 03:08

    I tried unsuccessfully to use @brian-deterling's technique, which is pretty commonly used by others who have discussed this... Maybe I'm doing something wrong, but meanwhile I found the dotenv-rails gem, and it worked very nicely for loading up values out of a .env file in my project root.

    The instructions on their Github repo are pretty straight-forward. I added the Dotenv.load to my config/application.rb

提交回复
热议问题