complicated installation spagetti of latest Rails 2.3.5
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:
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)
got error that 'actionpack' had dependency on 'rack' gem (v 1.0.0 required).
ok, ran 'gem install rack' - rack 1.1.0 got installed
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
re-run gem install rails again, now rails got installed
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
got to the point where 'fcgi' gem was missing, couldn't find co开发者_如何学编程mpiled version, read that it might be better to update rubygem version from 1.2 (buggy) to 1.3.5
- Ok, started to update rubygem. Got to the point where I can't complete 1.3.5 version installation because gemcutter gem is missing.
- trying to install gemcutter and it complaints that it requires rubygems 1.3.5!
- ... 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!
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).
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:
- gem install gemcutter
- gem install sqlite3-ruby
- 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.
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 ...
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.
精彩评论