Ruby virtual development environment

I mainly develop ruby ​​on rails on my car, but from time to time I end up using other laptops to develop RoR. It would be nice if there was something (perhaps a shell?) That basically brought all the gems installed on my machine to another machine without leaving any traces. It is basically a really lightweight virtual machine without an OS.

If that matters, I use mac. Ideally, I would like to keep this virtual environment in my Dropbox, and basically, when I use some other machine, I just get it from my Dropbox and start coding and don't have to worry about setting up the environment.

+3
source share
2 answers

As with Jacob's answer, I would recommend using RVM , but I will expand it. Here are some ideas for brainstorming:

RVM saves its sandbox in your home directory at ~/.rvm. All instances of Ruby, as well as gems associated with them, will be stored there. This is a simple addition to the file ~/.bashrcon your Mac to initialize RVM, so it is known by the shell when you log in to your account. It is also simple rm -rf ~/.rvmfrom the command line to remove the RVM sandbox from the account, after which the line from is deleted ~/.bashrc.

So basically, by setting up RVM correctly and installing your Ruby installation on one machine, you get 90% of how it is available for several machines.

, Ruby - Mac OS, RVM, , . RVM, Rubies rvm notes. , . XCode Ruby, , . RVM- Ruby Mac, ~/.rvm. , , Ruby, , .

MacVim, ~/bin GUI. , , . , /Applications ~/bin .

MacVim script, mvim, . , -: gvim gvim, gvimdiff gview. , ~/bin PATH MacVim mvim.

tarball vim, vim RVM, Mac, , ~/bin PATH RVM ~/.bashrc, , Ruby.

, Mac Linux. , Mac, , .

+5

rvm . , rvm Dropbox ( ~/.rvm, ), gemset .

+2
source

All Articles