From: Thomas Lucero Date: 2010-02-11T01:59:17+09:00 Subject: Re: Problems with RubyGems on a Debian machine Known problem. Both Debian apt/aptitude/Synaptic and RubyGems keep track of dependencies. However, they don't play well together. From http://blog.phusion.nl Installing Ruby/Rails software on Debian and Ubuntu Linux distributions has been less than ideal until now. Ruby has a package manager called RubyGems, but Debian-based distributions have their own package manager, namely Apt, which manages the entire system and is preferred by most Debian users. RubyGems does not integrate well with Apt and cannot handle native Debian package dependencies. But on the other hand, Ruby software provided through the current Debian Apt repositories are not always up-to-date, e.g. the latest Rails version is often not available. Issues and attempted solutions include (some apply to all RubyGems, others only if attempting Rails 3): 1. Debian specifically disables gem update --system 2. Use ruby gem rvm to help isolate issues of different ruby environments - including ruby version and gem sets. 3. (ruby 1.9.1) From Luis Lavena: Try ... RubyGems that cames with 1.9.1 instead of the 1.3.5 on top of it. 4. use ruby 1.8.7 (ruby 1.9.1 and 1.9.2 work for some but not all people) 5. Due to a rubygems bug, you must uninstall all older versions of bundler for 0.9 to work 6. So far rails 3.0.0.beta and ruby 1.9.1 are not friends. In order to install rails, you need rubygems 1.3.5, but ruby 1.9.1 has rubygems 1.3.1 bundled. Workaround 1: From Luis Lavena: Try ... RubyGems that cames with 1.9.1 instead of the 1.3.5 on top of it. Workaround 2. is to remove your manually installed rubygems from 1.9.x. Workaround 3. you can gem install --force. Or, convert gems to deb 7. dcu (alpha 2009/10/17) gem2deb - http://github.com/dcu/gem2deb 8. thwarted (alpha 2008/12/05) gem2deb - http://github.com/thwarted/gem2deb 9. Phusion/hongli (beta, Debian etch only!) DebGem - free now, pay later. My suggestions are (for ruby 1.9.x): 1. Uninstall all ruby gems, 2. Revert to RubyGems version 1.3.1 3. Install ruby gem rvm. 4. Use rvm to isolate the issues. > Greg Chambers wrote: >I wasn't quite sure if I should of posted this in the Ruby forum or the >Ruby on Rails forum but here it goes. >So I've been trying to install rails onto a Debian (Lenny) machine of >mine. I assumed from the readings I have done that RubyGems is supposed >to take care of dependencies for me, but apparently on my machine it >doesn't. It tries to install rails and then complains that I need a >version of Rack 1.0.0 or newer. Now RubyGems will let me install >packages that don't have the tree of dependencies like rails and so Rack >and Rake install just fine. But when I go back to installing Rails, it >still complains that I do not have rack installed or it is not a new >enough of a version. A friend of mine mentioned something about a file >the RubyGems uses to handle dependencies that can get messed up if >something goes wrong during an installation but I don't know anything >about that. Can anyone help? >Yes I did use debian's rubygems package, specifically whichever one is >hosted on the Rochester Institute of Technology mirror. -- Posted via http://www.ruby-forum.com/.