user$ \curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash -s stablePlease notice the backslash before curl. This prevents misbehaving if you have aliased it with configuration in your ~/.curlrc file. Make sure your current terminal session has loaded RVM:
user$ source ~/.rvm/scripts/rvmWhen you open a new shell, RVM is loaded automatically. Test if your installation was successful:
user$ type rvm | head -n 1 rvm is a functionYour terminal should output: rvm is a function Finally, see if there are any dependency requirements for your operating system by running:
user$ rvm requirementsInstallation done. Let's play around with certain Rubies. First install one, e.g. Ruby 1.9.2:
user$ rvm install 1.9.2Use the crisp Ruby installation:
user$ rvm use 1.9.2Check the version of your current Ruby:
user$ ruby -vIf you want to know which Ruby versions you already got on your RVM, list them:
user$ rvm list knownSet your favourite Ruby as default:
user$ rvm use 1.9.2 --defaultOne huge benefit of RVM is the possibility to install several named gemsets independent from your installed Ruby.
Create a gemset for Rails 3.2.9 (on your default Ruby 1.9.2):
user$ rvm gemset create rails_329Use it:
user$ rvm use 1.9.2-head@rails_329Install you first gem (Rails 3.2.9) on you gemset:
user$ gem install rails -v 3.2.9List the gemsets on your current choosen Ruby:
user$ rvm gemset listThere are a lot more options for RVM (e.g. user installation or benchmarking your code against several versions of Ruby and many more). I just referred to only a few/ some of the most important.
For going into detail please visit the RVM page. There you also will find an answer, if you discovered an issue depending on your used OS. Anyway you should take a look.
Keine Kommentare:
Kommentar veröffentlichen