Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ruby development environment

is it better to develop ruby on rails in a) windows b) linux or c) mac. why ?

edited :

the reason why i am asking this is that i heard that developing ruby on rails in windows is not as stable/good compared when you used ruby on rails in mac. (not sure though if that is true or not).

plus the fact that David Heinemeier Hansson (creator of Ruby on Rails) seems to be using Mac, so initial impressions seems to be Ruby on Rails applications and Mac goes well together.

like image 457
Michael Ellick Ang Avatar asked Apr 29 '09 23:04

Michael Ellick Ang


People also ask

Does Ruby have virtual environments?

Inspired by Python's virtualenv project, Ruby-Virtualenv is a utility to create sandboxed Ruby/Rubygems environments. It is meant to address the following issues: Conflicts with unspecified gem dependency versions.

Can you develop Ruby on Windows?

RubyInstaller. On Windows, RubyInstaller gives you everything you need to set up a full Ruby development environment. Just download it, run it, and you are done!

Do I need DevKit for Ruby?

Ruby is the programming language that Jekyll is written in. You'll need to install Ruby and the corresponding DevKit, which is needed to build some of Jekyll's dependencies as “native extensions”.


1 Answers

I strongly advise you don't develop on Windows. Why? First, there are a lot of things that break on Windows with every upgrade and the majority of gem or plugin creators don't use windows so they don't care about windows and don't run tests on it(there are several big name people who have flat out said that windows is NOT their problem it's yours). You'll find the *nix vs Windows problems will bite you in the ass again and again. Pathnames slashes, minor differences in ssh implementations, console and font problems, rubygems, capistrano, etc...

What will end up happening after a while is that you will always have this voice in the back of your head every time you have to debug something saying "Is this a problem only on Windows?" and that little voice is a cost to you..using up some of your battery every single day.

Macs are more expensive in terms of upfront dollars (which sadly I don't have) and linux platforms are more expensive terms of spending a day or two trying to get your wireless to work but those are upfront one time costs. The nagging insecurity of using Windows for Rails development is an ongoing cost. At least until the community starts rejecting things that are not truly cross platform.

As an example look at cucumber. For some reason a test framework is dependent on a particular console configuration not available in windows. So to use it in Windows you have to change the font in your console and change the code page in your console. Otherwise the letter "a" disappears from all the output. Why? Because it works fine for *nix systems and gives you pretty colours (I think this is a huge flaw and very very poor design choice even if you ignore windows).

You'll also feel like the guy who farted in the elevator every time you bring up a windows issue.

I say all this as some who has to use windows for his development platform at the moment. Hey, what's that smell?

[late edit: Ruby is also about 3 times slower on windows. This will impact your willingness run your tests all the time and hurt your TDD feedback cycle]

like image 84
srboisvert Avatar answered Oct 06 '22 20:10

srboisvert