Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Developing in Ruby, on a Windows machine, is too counter productive?

Tags:

scripting

ruby

It seems to be very counter productive in that so many gems will break on windows. I have been dealing with so many mysql and ruby-mysql gem problems (seg faults occuring in the gem itself, a class called UnixSocket apparently doesn't work well on windows machines, etc etc).

I'm I just wasting my time here? Should I move onto a different scripting language?

like image 521
Zombies Avatar asked Feb 13 '10 23:02

Zombies


2 Answers

I have very little experience with Ruby on Windows but when I was starting with Ruby I was on Windows and I got the general impression that it wasn't a Windows-native system.

So after many years of using primarily Windows, getting into Ruby prompted me to switch back to my original system, Unix, this time to Linux. Ruby did run with less hassle and running bash in its native environment was better than the just-mostly-OK Cygwin. I was happy.

Then my new employer had me switch to the Mac. Now I'm really spoiled, but really happy.

I realize this is subjective but ISTM that Linux was a lot better than windows and the Mac is a lot better than Linux. I could still run Windows in VMWare Fusion if I wanted to, but I don't. I do have some Linux VM's.

I think what I'm really trying to say is that there is a reason Ruby isn't best deployed on Windows. The kind of people who run Ruby are .. I'm trying to think of a non-pejorative word here .. not likely to be found on Windows.

So this is a turning point for you. Yes, .net is a sophisticated and well-documented environment, yes, windows has been reliable for several years now, and yes, it's a respectable system at this point. Yes, it runs Stack Overflow and some of the gurus are Windows guys. But it's just kind of a litmus test for .. darn, missing that word again ..

A lot of people run Windows because they just don't know what else to run. Linux is a good alternative if you have to buy the system yourself. And if you or your employer can afford it, the (Unix-underneath) Mac gives you everything Linux does plus the Mac-specific world.

It's time to choose... :-)

like image 194
DigitalRoss Avatar answered Nov 17 '22 01:11

DigitalRoss


I've been developing with Ruby on Windows for several years, including building and deploying "enterprise" intranet Rails apps running against Oracle, MySQL and SQLServer on both Windows and Solaris servers.

Agreed, there are a few gems that have compiled components whose authors have not built Windows versions - that's OK, it's an open-source platform and they don't have to if they don't want to. Similarly, you're perfectly entitled to (a) ignore libraries that don't have mswin32 or mingw32 versions or (b) give something back by compiling them yourself!

As for the MySQL gem, IIRC on Windows you need the "pure Ruby" adaptor, which does not use the MySQL C API: http://github.com/tmtm/ruby-mysql or gem install ruby-mysql

like image 31
Mike Woodhouse Avatar answered Nov 16 '22 23:11

Mike Woodhouse