Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

load .ruby-version if found #74

Merged
merged 1 commit into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 12, 2013
  1. @gregmolnar

    load .ruby-version if found

    gregmolnar authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 run_guard.sh
View
8 run_guard.sh
@@ -59,9 +59,9 @@ if [ $? -ne 0 ]; then # failed to load rvm
run_guard "$1"
else # successfully loaded rvm
printf "Found and Successfully loaded RVM as a function.\n"
- if [ -e "$1/.rvmrc" ]; then # found project specific .rvmrc
- printf "Found an .rvmrc in the project directory. Trying to load it...\n"
-
+ if [ -e "$1/.rvmrc" ] || [ -e "$1/.ruby-version" ]; then # found project specific .rvmrc or .ruby-version
+ printf "Found an .rvmrc or .ruby-version in the project directory. Trying to load it...\n"
+
cd "$1"
rvm rvmrc load "$1"
if [ $? -ne 0 ]; then # failed to load project specific .rvmrc
@@ -74,7 +74,7 @@ else # successfully loaded rvm
fi
else # failed to find project specific .rvmrc
printf "Failed to find a project specific .rvmrc in $1.\n"
-
+
printf "Attempting to switch to default RVM enviornment.\n"
rvm use default
if [ $? -ne 0 ]; then # failed to switch to the users default gemset
Something went wrong with that request. Please try again.