forked from snowyu/ruby-mongrel2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rvmrc
32 lines (25 loc) · 859 Bytes
/
.rvmrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory
environment_id="ruby-1.9.3@mongrel2"
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]; then
echo "Using ${environment_id}"
. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]; then
. "${rvm_path:-$HOME/.rvm}/hooks/after_use"
fi
else
# If the environment file has not yet been created, use the RVM CLI to select.
if ! rvm --create use "$environment_id"
then
echo "Failed to create RVM environment '${environment_id}'."
exit 1
fi
fi
filename=".rvm.gems"
if [[ -s "$filename" ]]; then
rvm gemset import "$filename"
fi
echo "The future belongs to the dogs."
echo