2

Update #3: Starting over from scratch, shortened this post, decided to re-install a clean copy of Ubuntu 10.04 on a VM and go through the walk-through again. So, all the steps go without a hitch. As root:

root@ubuntu:~/rubygems-1.3.7# ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
root@ubuntu:~/rubygems-1.3.7# gem -v
1.3.7
root@ubuntu:~/rubygems-1.3.7# rails -v
Rails 2.3.8

Now, as myself (in a separate term):

emptyset@ubuntu:~$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
emptyset@ubuntu:~$ gem -v
/usr/local/lib/site_ruby/1.8/rubygems.rb:10:in `require': no such file to load -- rubygems/defaults (LoadError)
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:10
    from /usr/local/bin/gem:8:in `require'
    from /usr/local/bin/gem:8
emptyset@ubuntu:~$ rails -v
bash: /usr/bin/rails: Permission denied

So, this appears to be a permissions issue, but I don't understand why. Specifically, if I have to start making things go+rx all over the place, I really need to understand which specific files need the permissions change.

1

4 Answers 4

4

Install Ruby Version Manager!

Seriously! I wish I would have done this sooner. Ruby Version Manager makes it possible to run multiple versions of Ruby, each with their own set of gems, and switch between the different versions seemlessly. Plus, you won't have to use sudo anymore. Plus, it's super easy to install, so you should do it!

1
  • I'll definitely try it the next time I have to do some Ruby work for a client. :)
    – emptyset
    Dec 2, 2010 at 15:59
1

From that tutorial (which appears to be down at the moment), these lines:

apt-get install build-essential
apt-get install ruby rdoc libopenssl-ruby

Should be replaced by:

apt-get install ruby-full build-essential

And everything works fine beyond that point. My guess is that some critical binaries are being left out when attempting a "minimal" install of ruby. Answer obtained via the RoR mailing list.

1

Have you tried to install?

apt-get install libopenssl-ruby

and perhaps install your Gems again (including rails)?

1
0

Not sure what the OP's question is, but I found this tutorial to be helpful for installing Ruby 1.9.2 from source (which also installs RubyGems 1.3.7) and then using gem to install Rails 3.0.0 on Ubuntu Server 10.04.1 LTS.

This method works well if you don't have any versions of Ruby, RubyGems or Rails already installed and you don't want/need to use RVM.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .