When I tried to install gem (ie. "ruby setup.rb"), I got the following error at the end:

Removing old RubyGems RDoc and ri.../usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /home/ugadi/gem_install/rubygems-0.9.2/./post-install.rb:103:in `install_rdoc' from /home/ugadi/gem_install/rubygems-0.9.2/./post-install.rb:118:in `try_run_hook' from setup.rb:584:in `run_hook' from setup.rb:1322:in `exec_task_traverse' from setup.rb:1175:in `exec_install' from setup.rb:894:in `exec_install' from setup.rb:717:in `invoke' from setup.rb:681:in `invoke' from setup.rb:1359

I thought I was able to bypass this problem, because I was able to actually call gem. I used gem to install Rails 1.2.1 and everything seemed fine...

until she tried to actually run a Rails app. When I started WEBrick and tried to call an action on a controller, I got a 404 Not Found error in the browser. There was an ArgumentError (I don't have the full text, I'll post it tomorrow) in the console.

Anyone have any ideas? How can I uninstall all of rails (including all the dependencies) and then reinstall it all?

If there is a post/website/blog entry/whatever that answers my questions, please don't hesitate to simply post a link. I know it can get old fast to answer the same question hundreds of times...

Re: Rails problems on Debian, I think it might be a gem problem

I have tried uninstalling (using apt-get remove) for ruby and rubygems. This seemed to work.

When I reinstalled, everything worked fine (according to apt-get).

However, when I run gem, I get the following:

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- sources (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/local/lib/site_ruby/1.8/rubygems/source_info_cache.rb:6 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/local/lib/site_ruby/1.8/rubygems/remote_installer.rb:12 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/local/lib/site_ruby/1.8/rubygems.rb:112:in `manage_gems' from /usr/bin/gem:10

Anyone have any ideas??

If there is a post/website/blog entry/whatever that answers my questions, please don't hesitate to simply post a link. I know it can get old fast to answer the same question hundreds of times...

Re: Rails problems on Debian, I think it might be a gem problem

I'm using Debian (etch) to install and run all this stuff without any problems. One thing you could still try is using aptitude instead of apt-get (aptitude installs dependencies and stuff automatically.)

Another thing that might help is, after you remove all of the offending packages, running these commands in order:

aptitude cleanaptitude autocleanaptitude updateaptitude upgrade

and then reinstall again like Danger said.

This should make sure any old cruft is cleaned from your system and you're using the latest versions of everything and everything that depends on it.

Re: Rails problems on Debian, I think it might be a gem problem

I am still having a problem after reinstalling all ruby related debs and reinstalling libgems.gem install rails etc works fine and puts all the gems at /var/lib/gems. However if I do as a regular user rails test

I get bash: rails: command not found.

If do arequire 'rails' from inside irb I get:LoadError: no such file to load -- rails from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:27:in `require' from (irb):1 So rubygems is not setting up the paths correctly? I'll keep digging and hopefully will find an answer. Meanwhile if any one has any ideas I'd love to hear about them.

Re: Rails problems on Debian, I think it might be a gem problem

sudo apt-get install rdoc

this fixed the following for me:

/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError) from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /usr/local/lib/site_ruby/1.8/rubygems/doc_manager.rb:71:in `load_rdoc' from /usr/local/lib/site_ruby/1.8/rubygems/doc_manager.rb:41:in `generate_ri' from /usr/local/lib/site_ruby/1.8/rubygems/commands/install_command.rb:112:in `execute' from /usr/local/lib/site_ruby/1.8/rubygems/commands/install_command.rb:111:in `execute' from /usr/local/lib/site_ruby/1.8/rubygems/commands/install_command.rb:49:in `execute' from /usr/local/lib/site_ruby/1.8/rubygems/command.rb:70:in `invoke' from /usr/local/lib/site_ruby/1.8/rubygems/command_manager.rb:120:in `process_args' from /usr/local/lib/site_ruby/1.8/rubygems/command_manager.rb:91:in `run' from /usr/local/lib/site_ruby/1.8/rubygems/gem_runner.rb:30:in `run' from /usr/bin/gem:23