views:

93

answers:

3

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?

+3  A: 

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

danp
I agree completely with @danp. I do Rails development on Ubuntu running in VirtualBox on Windows 7. Using VMs gives you the ability to have access to many different versions of and configurations of an OS/development environment pair. With dual boot, you are largely limited to one or two. VMs give you the ability to work on multiple projects without any risk that one project will modify the environment of the other.
Adam Crossland
One more thing: to get the best performance out of your virtual machine, have the virtual machine's disk image live on a separate disk spindle from your operating system. This will increase the total I/O throughput, and it should noticeably boost the virtual machine's responsiveness. I have an external USB 2.0 disk drive that all of my many virtual machines live on.
Adam Crossland
OK, this is my last one more thing: I haven't used Redcar, but NetBeans is a superb IDE for developing Rails applications. If, like me, you are a Windows developer, you probably know and love Visual Studio. NetBeans provides a similar integration of tasks and tools. I love it and wouldn't work without it.
Adam Crossland
You might even find that Ubuntu is ready for the desktop as you're using a virtual machine. For me this is exactly how I switched to linux. I was using RadRails (still do) which is based on Eclipse, Firefox, Pidgin, Gimp, Thunderbird, etc. and one day I realized all of the applications I used were Open Source and originally developed for Linux. I switched over and haven't looked back. I'm a Fedora user, but the learning curve is a bit higher than Ubuntu, and 10.04 is rock solid.
Patrick Klingemann
Once you get your head around virtualization, you never look back. I've got a virtualized windows XP whose sole purpose is to have vanilla IE6 / ancient flash etc. Why bother with dualbooting this kind of configuration..? Then you realise that you can backup your _entire setup_ by copying one file, and that is a beautiful, beautiful day :)
danp
Exactly, @danp. Virtualization has completely changed the way that I think about software development, operating systems and tools.
Adam Crossland
A: 

Don't bother with dual boot, you'll find yourself avoiding it before long. Just use VM's. I'd even - and currently do - use a VM for windows coding. VM snapshots are your friend.

Also, use Ubuntu; it's just easier to setup and get going. (ran Fedora for years but got tired of the setup)

VirtualBox or VMWare both work well.

joshc
+1  A: 

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.

Alan Peabody