Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby On Rails on Windows - Linux VM or dual boot

I am a windows developer currently getting into Rails. While you can develop on RoR Windows, it's not the ideal experience. Things are glitchy and running cucumber tests are painfully slow.

So, would I be able to have a decent dev experience running Linux in a VM for doing RoR development, or should I bite the bullet and just do a dual boot - Windows 7 / Linux?

like image 639
CocoB Avatar asked Jun 17 '10 13:06

CocoB


People also ask

Should I do dual boot or use virtual machine?

One of the biggest benefits of a virtual machine over dual-booting is that a virtual machine is sandboxed. This means that the virtualized operating system runs in a completely isolated environment. For the most part, nothing within the virtualized operating system can affect the native operating system.

Does Ruby run on a virtual machine?

You can create a VM to host your Ruby web app in Azure Stack Hub.

Can Ruby on Rails run on Windows?

Ruby and rails can be installed on Windows using the WSL (Windows Subsystem for Linux) or using the Ruby Installer. Ruby can be set up in the same directory as the default directory for the bash shell so that its easier to navigate to in windows.


2 Answers

It makes sense that your development environment should follow your production as closely as possible, especially while learning.

With that in mind, a virtual machine of some kind is going to be the best way forward, despite the additional headaches such as setting up networking between the host and the guest machine. I've been doing this personally in a Magento project, and can safely say the time spent getting it all just right was amply rewarded with less headaches at the end of the process, and now its all setup, can easily be reused.

About dual boot, its really not worth the hassle considering how easy it is to get a VM up and running, and for these purposes, there is no difference.

Just make sure you look into the virtual box guest additions installation if you go down this route, everything gets much cooler once they are installed and running on the guest.

Links for resources:

VirtualBox

NAT Configuration of virtualbox, some ideas

Redcar editor - textmate style editing on linux including TM bundle support

like image 170
dmp Avatar answered Oct 06 '22 08:10

dmp


Dual boot is the way to go if you are at all serious about getting into rails, and will be spending extended periods of time working in rails.

Unless you have a very powerful machine the overhead of windows + Ubuntu/linux + rails server + database server + ide/editor will be painful.

Dual booting is easy to set up and with the fast boot speeds switching back and forth should be fairly painless.

However, if you are still very casually exploring rails or expect to switch back and forth very often, then maybe a VM is the way to go.

like image 21
Alan Peabody Avatar answered Oct 06 '22 07:10

Alan Peabody