Tell pow to use the ruby setting from rvm

von tobonaut

I’m using pow in the development of ruby/rails applications for easily accessing them using a .dev domain on my local machine. E.g. my project ~/Development/meow is browsable at

To let this tool know which version of ruby and which gemset from my rvm installation it should use the following content has to be saved as a file called .powrc in the application directory.

if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ] && [ -f ".ruby-gemset" ]; then
  source "$rvm_path/scripts/rvm"
  rvm use `cat .ruby-version`@`cat .ruby-gemset`

I’m pasting this here because in the past I had first to google for the correct version of it when I was to setting up a new site in pow on a different computer.