If it matters, I am using a mac. Ideally, I want to keep this virtual environment in my Dropbox, basically when I use other machines, I will get it from my Dropbox and start coding without worrying about the settings Environment.
RVM stores its sandbox in the home directory of ~/.rvm. All Ruby instances and related gems will be stored there. It is in Mac A simple addition to the ~/.bashrc file to initialize RVM, so when you log in to your account, the shell will know it. It is also a simple rm -rf~/.rvm in the command line to delete from the account RVM sandbox and then delete the line from ~/.bashrc.
So basically, by setting up RVM correctly and installing Ruby installation on one computer, you can use 90% of the way Multiple computers.
I’m pretty sure Ruby will be installed without relying on the Mac OS currently using RVM, but there are some libraries that can improve the experience. After installing RVM, but before installing any Rubies, please Run the rvm notes. This will tell you what else is installed. You need the current XCode to compile Ruby, but only on the machine you compiled. Once installed, you should be able to control RVM by copying the ~/.rvm directory Ruby moves to other Macs. Therefore, you not only own gems, but also specific versions or versions of Ruby, and related gems, so your regression tests can also work.
If you use MacVim, You can install it in ~/bin and have a GUI version. I haven’t tried running it from there, but it seems to work. You may need to create an alias in /Applications to the alias in ~/bin to double click.
MacVim comes with a shell script called mvim, which can be launched from the command line. I have a bunch of soft links that let me start from the command line Call it in various ways: gvim, and gvim variables like gvimdiff and gview. You can achieve the same purpose by adding ~/bin to the PATH and linking to MacVim’s mvim locally in that directory.
< p>You can build a tarball of vim configuration, vim installation and RVM sandbox, copy it to another Mac, expand it, add ~/bin to PATH and append the required RVM initialization line in ~/.bashrc , Open a new command-line, and have your editor and Ruby sandbox.
This is a small change in the way my Mac and Linux boxes are set up. I didn’t try to bundle everything together , But, it should work on Macs with the same operating system version.
I mainly do ruby on rails development on my machine, but sometimes I end up using RoR development for other laptops. If there is something (maybe the shell? ) Would be great, this can basically bring all the gems installed on my machine to other machines without leaving any traces. It is basically a very light virtual machine with no operating system stuff.
If it matters, I am using a mac. Ideally, I want to keep this virtual environment in my Dropbox, basically when I use other machines, I will get it from my Dropbox and Start coding without worrying about setting up the environment.
Similar to Jacob’s answer, I recommend using RVM, but I will extend it. Here are some brainstorming ideas :
RVM stores its sandbox in the home directory of ~/.rvm. All Ruby instances and related gems will be stored there. It is from the ~/.bashrc file in Mac A simple addition to initialize RVM, so when you log in to the account, the shell will know it. It is also a simple rm -rf~/.rvm in the command line to remove the RVM sandbox from the account, and then from Delete the line from ~/.bashrc.
So basically, by setting up RVM correctly and installing Ruby on one computer, you can use 90% of the way for multiple computers.
p>
I’m pretty sure Ruby will be installed without relying on the Mac OS currently using RVM, but there are some libraries that can improve the experience. After installing RVM, but before installing any Rubies, please run the rvm notes. This will Tell you what else to install. You need the current XCode to compile Ruby, but only on the machine you compiled. Once installed, you should be able to move RVM controlled Ruby to other Macs by copying the ~/.rvm directory. Therefore, not only do you own gems, but you can also own specific versions or versions of Ruby, and related gems, so your regression tests can also work.
If you use MacVim, you can find it in ~/bin Install it in and have a GUI version. I haven’t tried running it from there, but it seems to work. You may need to create an alias in /Applications to the alias in ~/bin to double click.
MacVim Comes with a shell script called mvim, which can be launched from the command line. I have a bunch of soft links that let me call it in various ways from the command line: gvim, and gvim variables like gvimdiff and gview. You can pass ~/bin is added to the PATH and locally linked to MacVim’s mvim in that directory to achieve the same purpose.
You can build a tarball of vim configuration, vim installation and RVM sandbox, and copy it to another A Mac, expand it, and place ~/b in to the PATH and append the required RVM initialization line in ~/.bashrc, open a new command-line, and have your editor and Ruby sandbox.
This is my Mac and A small change in the way the Linux box is set up. I did not try to bundle everything together, but it should work on a Mac with the same operating system version.