Created
March 14, 2012 13:55
-
-
Save sr75/2036639 to your computer and use it in GitHub Desktop.
rvm quick setup examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from your user dir | |
cd | |
# create or update .bash_profile | |
touch .bash_profile | |
# Install RVM: (https://rvm.io/rvm/install/) | |
curl -L get.rvm.io | bash -s stable | |
# Reload your shell environment: | |
source ~/.bash_profile | |
# Find the requirements (follow the instructions): | |
rvm requirements | |
# Install rvm ruby: | |
rvm install ruby-1.9.3-p194 | |
# list install rubies | |
rvm list known | |
# use ruby-1.9.3-p194 | |
rvm use ruby-1.9.3-p194 | |
# set your preferred ruby default as ruby-1.9.3-p194 | |
rvm use 1.9.3-p194 --default | |
# generate ri / rdoc for the current ruby | |
rvm docs generate | |
# create a rails 3.2.3 gemset | |
rvm gemset create rails323 | |
# switch to above gemset | |
rvm gemset use rails323 | |
# setup up gemset for project | |
gem install bundler | |
gem install rails -v '3.2.3' | |
# create a rails app using the rails323 gemset created above | |
rails new myapp | |
cd myapp | |
# create a new .rvmrc file for the project | |
rvm --rvmrc --create ruby-1.9.3-p194@myapp | |
cd .. | |
cd myapp | |
# the project now has a working .rvmrc file | |
# for more on the .rvmrc see -> https://rvm.io/workflow/rvmrc/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment