Last active
April 18, 2018 15:40
-
-
Save nfabredev/49ff541593e0a92b49b6fd6b59d929de to your computer and use it in GitHub Desktop.
how to setup & use rvm coming from rbenv
This file contains 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
If you are coming from rbven do that first: | |
`brew remove rbenv` | |
`rm -rf ~/.rbenv` | |
Then install rvm: | |
`gpg --keyserver hkp://pgp.mit.edu--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3` | |
`\curl -sSL https://get.rvm.io | bash -s stable --ruby` | |
Enable tab completion: | |
`nano .bashrc` | |
`[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion` | |
Install any version of ruby you want: | |
`rvm install ruby-version` | |
Create a gemset for a specific project: | |
`rvm gemset create specific-project` | |
and use the one you want: | |
`rvm gemset use test_project` | |
Then go to your project and install the gems to that gemset eg: | |
`gem install bundler && bundle install` | |
To automate the gemset changing per project basis you can write down the ruby version & gemset in the project: | |
`nano .rvmrc` | |
`rvm ruby_version@gemset` | |
To verify which gemset you use: | |
`rvm gemset name` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment