views:

111

answers:

6

For non-Rails work, regular Ruby works fine on my Windows 7 machine.

But I'm about to start some Rails work that will use SQL Server as a database, and trying to get Rails set up has been a total pain so far. (I still can't get sqlite3 or SQL Server to work correctly with Rails yet.)

So I'm wondering: will using IronRuby (which I haven't used before) make the whole process of using Rails on Windows+SQL Server a lot easier? I'm not terribly interested in .NET integration or the latest Rails features, I just want something that runs on Windows and that can access SQL Server.

+1  A: 

IronRuby will not make the process any easier for you, and you should be aware that any gems you want to use will have to be pure Ruby, since IronRuby won't support gems which require native extensions.

The only good reason for using IronRuby is to use the .Net support.

slomojo
+3  A: 

Hello,

I'm wondering what are you using as Ruby on Windows. Asking this because we invested a lot of time and work on RubyInstaller to provide binaries and a complementary Development Kit to ease installation of gems that require compilation.

I would recommend you look at our Tutorials page in our wiki for some articles about using MS SQL with Cucumber, setting up sqlite3-ruby and others.

Hope this helps.

Luis Lavena
I agree. I have been using Ruby on Windows for a while now and I don't have any complaints.
Ed Swangren
Hmm, I think I've got it all working now (using RubyInstaller and the tutorials you pointed me to), many thanks! =)
grautur
A: 

if IronRuby is the only one that supports SQL Server, then, yes, using it would be your best bet. Other than that it tends to run rails a bit slower than other impl's...jruby can work well on doze...

rogerdpack
A: 

Have you tried the activerecord-sqlserver-adapter gem? I'm using it on Linux, but I'm guessing it should be easier to use on Windows. Apparently it works on both MRI Ruby and IronRuby.

Teoulas
A: 

You should use the activerecord-sqlserver-adapter gem. Look at http://github.com/rails-sqlserver/activerecord-sqlserver-adapter for installation help and you may search the google group Rails SQLServer Adapter for some more information too.

Klaus
Yep, I've been trying to use the gem. (But having trouble getting it installed and working :|.)
grautur
+1  A: 

like everyone else said - IronRuby won't make your life easier. it will make it more difficult in this case, because it take a lot more work to get rails up and running on IronRuby and you will lose out on native extension support.

I'm a .NET developer by day, and I do Rails development on Windows at night. I have zero issues with the core of rails or SQLite (I don't use SQL Server, though). for a good tutorial on how to get Rails working, including how to get SQLite working, see this link:

http://accidentaltechnologist.com/ruby-on-rails/running-rails-3-on-windows/

the SQLite installation is simple, but not obvious.

Derick Bailey