Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails development on windows

I've been planning on developing a rails project on windows. I've heard that the framework wasn't tested on windows (at least not the testing framework)

does anyone have any real experience with rails on windows? are there any known bugs when running on windows? does the testing framework work on windows?

like image 643
David Avatar asked Jan 12 '11 20:01

David


People also ask

Can I develop Ruby on Rails 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.

Can you run Ruby on Windows?

There are two ways to run Ruby on Windows. The more straightforward method is to use the Ruby installer to install all the software packages required. The more robust method is to install the Linux subsystem on Windows 10, then use Linux commands to install Ruby.


2 Answers

I've been developing a Rails website on Windows & Mac (depending on where I am at the time) for a few months now and, in general, I haven't run into to many problems. Here's what I know:

The new Ruby 1.9.3 installer for Windows is nice because it comes with RubyGems (which a vague memory tells me was difficult before). That's what I'm using. I haven't been able to get the ruby-debug19 gem to install correctly on windows. So, I just comment that out in my Gemfile on my Windows computer. Other than that, I haven't had any issues.

With that said, however, I love developing on my Mac so much more than I do on Windows. I haven't found an editor that I love for Rails development on Windows (currently using Sublime 2 or Notepad++ with Explorer plugin), using Git is not as nice on Windows, and I just really don't like the Windows Command Prompt (I know there are other options, but still).

like image 63
dontangg Avatar answered Oct 05 '22 11:10

dontangg


I have recently been working with another developer that has been developing on his Windows laptop. He's been using the same tools and Rails 3 codebase as myself (I'm on Mac OS X).

He has had a number of blocking issues that have wasted many hours of his time - for example he hasn't been able to run any of our RSpec tests, and some Rake tasks.

Getting the environment setup is a pain, and even when you do, it's stressful because you never know when you are going to hit the next bizarro Windows-only bug. The reality is that Windows is a rare OS among Rubyists, and even if that wasn't so, the Rails framework developers themselves are UNIX-oriented, so there is an order of magnitude less scrutiny given to testing and development on the platform.

What's more, many of the sweet tools in the Ruby world are command-line and they work better in a real POSIX shell.

My co-worker has now bought a MacBook, and is enjoying a smoother development experience again.

But you don't need to buy a Mac; You would do just as well with dual-booting into Ubuntu (Or similar) on your existing laptop.

like image 26
Scott Avatar answered Oct 05 '22 11:10

Scott