Results 1 to 6 of 6

Thread: Ruby Gems not working

  1. #1
    Join Date
    Dec 2004
    Beans
    36

    Ruby Gems not working

    I had my interest in Ruby server side development piqued by an article on slashdot today, and I decided where better to try and set up ruby than on the laptop I run Ubuntu on.

    However, I ran into some serious issues with it that have more or less completely torpedoed my hopes of trying out Rails et al.

    Essentially, there are some fundamental flaws with the way that Ruby is packaged for Ubuntu, as far as I can tell. The Ruby equivalent to CPAN -- Gems -- is not included by default, and even when I have installed it, I still cannot install some of the packages. After, for example, installing actionpack, from there on out I can get no closer to installing Rails.

    Can anyone who is using Ruby on Ubuntu maybe offer some tips on how you got your setup to work? I'm on warty, if it makes a difference.

  2. #2
    wtd is offline Just Give Me the Beans!
    Join Date
    Oct 2004
    Beans
    46

    Re: Ruby Gems not working

    I solved this problem just today. Grab the latest source for Ruby from http://www.ruby-lang.org and compile it. You probably want to configure it to install in /usr instead of /usr/local so it'll overwrite the Ruby you already have.

    Then try installing gems again. Worked fine for me. Just make sure you run "ruby setup.rb" as super user.

  3. #3
    Join Date
    Dec 2004
    Beans
    36

    Re: Ruby Gems not working

    Quote Originally Posted by wtd
    I solved this problem just today. Grab the latest source for Ruby from http://www.ruby-lang.org and compile it. You probably want to configure it to install in /usr instead of /usr/local so it'll overwrite the Ruby you already have.

    Then try installing gems again. Worked fine for me. Just make sure you run "ruby setup.rb" as super user.
    Thanks, that's just right.

    Works like a charm!

  4. #4
    Join Date
    Oct 2004
    Beans
    104

    Re: Ruby Gems not working

    Quote Originally Posted by offby1
    I had my interest in Ruby server side development piqued by an article on slashdot today, and I decided where better to try and set up ruby than on the laptop I run Ubuntu on.

    However, I ran into some serious issues with it that have more or less completely torpedoed my hopes of trying out Rails et al.

    Essentially, there are some fundamental flaws with the way that Ruby is packaged for Ubuntu, as far as I can tell. The Ruby equivalent to CPAN -- Gems -- is not included by default, and even when I have installed it, I still cannot install some of the packages. After, for example, installing actionpack, from there on out I can get no closer to installing Rails.

    Can anyone who is using Ruby on Ubuntu maybe offer some tips on how you got your setup to work? I'm on warty, if it makes a difference.
    There are more flaws than gems being missing; take a look some time and see how many different directions the ruby standard library is split.

    I got this hint from the Ruby on Rails website. It requires installing wajig, of course.

    Code:
    wajig install `wajig list-names ruby1.8` irb1.8 rdoc1.8 ri1.8
    If I had it to do over again, I'd rather do the following (warning, not tested):

    Code:
    aptitude --with-recommends --with-suggests install `wajig list-names ruby1.8` irb1.8 rdoc1.8 ri1.8
    Then you can install Gem by hand (go on, it won't hurt.)

    That should be a more-or-less complete Ruby install. It was complete enough for me to install Ruby on Rails (though truth be told I'm still evaluating it and am a complete Ruby n00b.
    Last edited by regeya; February 2nd, 2005 at 03:17 AM.

  5. #5
    Join Date
    Feb 2005
    Location
    Portland, OR
    Beans
    82
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Ruby Gems not working

    Thanks for the tip regeya, I was getting really frustrated trying to get rails going. However the command,

    Code:
    aptitude --with-recommends --with-suggests install `wajig list-names ruby1.8` irb1.8 rdoc1.8 ri1.8
    did not work for me for some reason. I got the same errors when installing rubygems that I had gotten after building ruby myself, that the zlib library could not found. Everything did work after I tried,

    Code:
    wajig install `wajig list-names ruby1.8` irb1.8 rdoc1.8 ri1.8

  6. #6
    Join Date
    Oct 2004
    Beans
    21

    Re: Ruby Gems not working

    These instructions worked for me ... straight from the source...
    http://wiki.rubyonrails.com/rails/sh...DebianUnstable

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •