views:

429

answers:

4

Hi, the basic and, I guess, more rhetorical question is why RoR installation/maintenance became so F%#$ing complicated?

Some background of the problem: Platform: Windows XP Ruby version: 1.8.6 A few dozens gems installed with gem version 1.2.0 Current Rails version: 2.1

I just wanted to update to rails 2.3.5 thinking that I have a modest desire, but apparently not. My struggle:

  1. ran 'gem update rails --include-dependencies' (got message that this option is not supported any more (why not?), but update went on for a while)

  2. got error that 'actionpack' had dependency on 'rack' gem (v 1.0.0 required).

  3. ok, ran 'gem install rack' - rack 1.1.0 got installed

  4. re-run 'gem install rails', but got the same problem. Thought that it might not like rack 1.1.0... ok, found 1.0.0 version, downloaded it, uninstalled v. 1.1.0, installed v. 1.0.0 instead

  5. re-run gem install rails again, now rails got installed

  6. ran 'rails app-name' to create my app, got a few consecutive errors that this or that gem was missing. Installed them as I went

  7. got to the point where 'fcgi' gem was missing, couldn't find compiled version, read that it might be better to update rubygem version from 1.2 (buggy) to 1.3.5

  8. Ok, started to update rubygem. Got to the point where I can't complete 1.3.5 version installation because gemcutter gem is missing.
  9. trying to install gemcutter and it complaints that it requires rubygems 1.3.5!
  10. ... and by the way, 'rails my-app' still produces error that fcgi gem is missing

Isn't it NUTS?!

I hope that my experience is not unique and maybe someone could help me out here. Thanks in advance!

A: 

Ruby, Rails and Windows have never played particuarly well. I am on OS X and Ubuntu, and it's definitely not this bad.

The migration to Rails 2.3.x is a step toward Rails 3, so there is a little bit of extra fiddling required (the move to Rack being the most obvious).

I just realised I have no actual answer ...

Toby Hede
A: 

InstantRails makes it real easy to install on Windows, because they've done all the complicated work for you... but you have to be willing to use older versions of Ruby and Rails since it hasn't been updated in 3 years.

JRL
Hmmm... yes, this is a drawback... but thanks!
Eug
+2  A: 

Windows XP Ruby version: 1.8.6

That is your major issue. I used to have a lot of issues, mainly performance and gem/plugin related when developing on Windows (some gems would not compile).

Life has been much less frustrating once I moved my Rails development onto a virtual machine running first Ubuntu and more recently Debian.

My main motivation was that the development platform should match the deployment platform (Ubuntu) as closely as possible.

I've written a guide on how to setup an Ubuntu Rails development environment on Windows XP using VirtualBox (free virtualisation software).

Nazar
This seems to be a common pattern with those Ruby people tied to Windows ... go virtual. Or switch :p.
Toby Hede
Thanks, Nazar, I'll definitely look into it!
Eug
+2  A: 

I suspect that the problem is that you are using the One-Click Installer distribution for Ruby, which is now very out of date. Use the RubyInstaller instead, which supersedes OCI and solves a lot of the Ruby on Windows issues.

RubyInstaller includes a current version of RubyGems, and the project also provides an optional compiler called DevKit, which enables any native extensions included in gem packages to compile correctly. RubyInstaller is marked as a Release Candidate because there are a few tweaks left to improve the user experience, but I've found it fully functional and stable.

The --include-dependencies behavior is now the default for RubyGems, so once you have RubyInstaller and DevKit you can set up your stack like this:

  1. gem install gemcutter
  2. gem install sqlite3-ruby
  3. gem install rails

I'm assuming that you have SQLite3 on the system already. If not, you just need to grab the files sqlite3.dll and sqlite3.exe from the SQLite Website and stick them in a folder on your PATH before you install the gems.

Stuart Ellis
Thanks, Stuart, in the meantime (before moving to Ubuntu)I went with your suggestion, removing older Ruby version and getting 1.9. Yes, I'll have to re-install all needed gems, I guess there is no other way to get around my problems. Thanks for the link!
Eug