marcusshepp
5/12/2016 - 7:19 PM

Notes on Ruby Environment

Notes on Ruby Environment

# to install diff Ruby verison
rvm install ruby-1.8.7-head

# to force RVM to use a diff Ruby version by default
rvm --default use 1.8.7

# to create a new rvm enviornment
rvm use 1.8.7@foo --create

# to install the package that will interate over 
# Gemfile and install all gem dependencies
gem install bundler

# if there's no gem file
# check foo/config/enviornment.rb
# the requirements should be listed out there

# to install a package without the documentation
gem install foo --no-ri --no-rdoc

# to install a package without the automatic download of it's depedencies
gem install --ignore-dependencies resque -v1.25.2

# to permanentely remove documentation installation
echo "gem: --no-document" >> ~/.gemrc

# if getting:
# ERROR:  While executing gem ... (OpenSSL::SSL::SSLError)
    # SSL_read:: shutdown while in init
rvm install rubygems 1.4.2

## Switch your Rubies
# If you have a default Ruby you want to use, change it with the following command.
rvm --default use 1.9.2
# To use – for example – the newly installed 1.8.7-head version, just type:
rvm use 1.8.7-head
# To switch back to the system's default Ruby (e.g. OS X), type:
rvm use system
# You can also reset RVM to use the system Ruby again. This will somewhat disable RVM:
rvm reset