-
Notifications
You must be signed in to change notification settings - Fork 28
/
.rvmrc
30 lines (24 loc) · 847 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
#!/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-2.2@linguistics"
rvmdir=${rvm_path:-$HOME/.rvm}
gemset_file=".rvm.gems"
if [[ -d "${rvmdir}/environments" && -s "${rvmdir}/environments/$environment_id" ]]; then
echo "Using ${environment_id}"
. "${rvmdir}/environments/$environment_id"
if [[ -s "${rvmdir}/hooks/after_use" ]]; then
. "${rvmdir}/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
if [[ -s "$gemset_file" ]]; then
rvm gemset import "$gemset_file"
fi
echo "ObjectSpace.each_object.map( &:class ).en.conjunction"
echo