Installing Ruby on Rails -- "gem update --system is disabled on Debian".
1 Attachment(s)
I've found myself in a bit of a quandary while installing Ruby on Rails on my Lenny box.
Short version: When I try to install all of the ruby gems needed to run Ruby on Rails, I get to a point where ruby requires rubygems v. 1.3.1. According to ruby, the recommended method of upgrade is "gem update --system", however I get the following error when I try this: Code:
ERROR: While executing gem ... (RuntimeError) Long Version (i.e. How the @$# did you get yourself into this mess?) I started by doing an apt-get install of rails and rubygems. I had read that the Debian packaging standards don't play nice with the way that Ruby installs files, so I decided to install everything from that point using 'gem install' rather than apt-get. A transcript of the steps that I took is here: Attachment 1306. At this point, I ran into the error quoted above. I backed out all of the gem installs that I had done so far, using "gem uninstall", and ran "apt-get install rails". Then tried typing 'rails -v' and got something like this: (sorry, the exact error message has scrolled out of the terminal line buffer) rails: /var/lib/gems/1.8/bin/rails no file or directory. Code:
$ type rails Ok... no harm, no foul, now that I've done the proper apt-get install rails, presumably something has changed so that when I start resolving the cascade of dependencies, I won't need to upgrade rubygems... gem install rails, gem install test-spec, gem install camping, gem install fcgi, gem install memcache-client, gem install mongrel, gem install ruby-openid -v "~> 2.0.0" (#@$% versioning error), gem install thin... Finally, rails -v gives me "Rails 2.3.3". Code:
$ rails hello when all the directories are created, Code:
$ cd hello I think that I must have taken a wrong turn from the Debian way when I started installing everything as gems at the beginning, but I'm not clear as to how to rectify the situation. AFAIK, gem uninstall is a fairly clean uninstall; after I uninstalled all of the gems after the first go-around, I would have thought that "apt-get install rails" should have installed the necessary version of rubygems and all of the correct version of all of the gems that ruby requires, alas it is not so. Any and all suggestions welcome. |
Install rubygems from source
It seems that the answer is probably to install Rubygems from source. Look here for details: http://articles.slicehost.com/2009/4...-ruby-on-rails
Will post results after I've tried this. |
worked like a charm.
Installing rubygems from source was dead simple, and I've got a working rails install.
|
All times are GMT -5. The time now is 08:18 PM. |