Skip to content
mengfung.com
writing

RVM on Production

 ·  1 min read

http://lee.jarvis.co/rvm-plays-nice-on-production/

cut and paste just in case:

  1. Switch to root user: su root
  2. Grab the latest RVM code from github: git clone git://github.com/wayneeseguin/rvm.git
  3. cd rvm
  4. ./install
  5. Watch the pleasures of RVM christening your system with its awesome juicy curvaceous..ness
  6. Remove the rvm folder: rm -rf rvm
  7. Add rvm group: groupadd rvm
  8. Add yourself to said group: usermod -aG rvm injekt
  9. Add rvm_path to /etc/rvmrc: echo "export rvm_path=/usr/local/rvm" > /etc/rvmrc
  10. Open up /etc/profile and add these lines
  11. Give the rvm group ownership to it’s rightful rubies: chown -R root:rvm /usr/local/rvm
  12. Give write access to all members of the rvm group: chmod -R g+w /usr/local/rvm
  13. Switch back to non-root: exit
  14. Dance a little bit
  15. rvm install <ruby version>
  16. Eat sammich
  17. Set default Ruby version: rvm use <ruby version> --default
  18. Profit

* First you need to add all users that will be using rvm to ‘rvm’ group,
and logout – login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.

* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.