Skip to content

Instantly share code, notes, and snippets.

@mpapis
Created June 7, 2013 19:19
Show Gist options
  • Select an option

  • Save mpapis/5731687 to your computer and use it in GitHub Desktop.

Select an option

Save mpapis/5731687 to your computer and use it in GitHub Desktop.
Description for integrating RVM with POW

Using RVM with POW

POW has removed automated detection of rvm, here is how it can be restored by creating .powenv in the root of the project, according to POW docs it should not be checked in to source control (unless all team members agree on that).

.powenv:

# detect `$rvm_path`
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="$HOME/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi

# load environment of current project ruby
if
  [ -n "${rvm_path:-}" ] &&
  [ -x "${rvm_path:-}/bin/rvm" ] &&
  rvm_project_environment=`"${rvm_path:-}/bin/rvm" . do rvm env --path 2>/dev/null` &&
  [ -n "${rvm_project_environment:-}" ] &&
  [ -s "${rvm_project_environment:-}" ]
then
  echo "RVM loading: ${rvm_project_environment:-}"
  \. "${rvm_project_environment:-}"
else
  echo "RVM project not found at: $PWD"
fi

Related http://pow.cx/manual.html#section_2.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment