Using pow with rvm's new ruby-version and ruby-gemset
RVM recently switched from .rvmrc to .ruby-version and .ruby-gemset.
If you have a .powrc that was generated by pow for .rvmrc, use this instead.
# .powrc
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`
fi
Written by Amiel Martin
Related protips
2 Responses

I revised it a bit, so not more forking to cat
:
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ] && [ -f ".ruby-gemset" ]; then
source "$rvm_path/scripts/rvm"
RUBY_VERSION=$(< "$PWD/.ruby-version")
RUBY_GEMSET=$(< "$PWD/.ruby-gemset")
rvm $RUBY_VERSION@$RUBY_GEMSET
fi
over 1 year ago
·

Very nice!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rvm
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#