need quick check on my rubygems install procedure

Discussion in 'Ruby' started by Tom Cloyd, Dec 13, 2008.

  1. Tom Cloyd

    Tom Cloyd Guest

    I'm running Kubuntu Linux 8.10 - a fresh install. I'm setting up Ruby now.

    I've done this before, but it takes very little for me to be in over my
    head, so I need a quick review from someone who actually 'has a clue'.

    I have just installed Ruby 1.8.7 from the source available at the Ruby
    website. No problems. I then downloaded from Rubyforge the
    rubygems-1.3.1.tgz module, unpacked it, and launched its setup.rb file.
    There was no console response other than a new command line. I assume
    this is normal.

    Then....I issue a gem -v, and get back "1.2.0".

    I'm lost at this point. I thought I just installed v. 1.3.1.

    "which gem" produces "/usr/bin/gem".

    Looking there, I see both a "gem" and a "gem1.9".

    Oh boy. Two versions. "gem1.9 -v" also produces "1.2.0". Now I'm really
    confused. And why "gem1.9"? What's THAT about?

    Being very suspicious at this point, I issue "which ruby1.9" and get
    back "/usr/bin/ruby1.9". "ruby1.9 -v" produces "ruby 1.9.0 (2008-06-20
    revision 17482) [i486-linux]". This is just nuts. I didn't install this.
    Where did it come from?

    If I'm going to use my new Ruby 1.8.7 and want it to use the latest
    rubygems, which I presume IS somewhere in my filesystem, what do I need
    to do? Anything at all?

    Can someone please untangle this for me, so I can just get back to work
    with my ruby learning...?

    Thanks (very much!) in advance.

    Tom
     
    Tom Cloyd, Dec 13, 2008
    #1
    1. Advertising

  2. Tom Cloyd

    Tom Cloyd Guest

    Tom Cloyd wrote:
    > I'm running Kubuntu Linux 8.10 - a fresh install. I'm setting up Ruby
    > now.
    >
    > I've done this before, but it takes very little for me to be in over
    > my head, so I need a quick review from someone who actually 'has a clue'.
    >
    > I have just installed Ruby 1.8.7 from the source available at the Ruby
    > website. No problems. I then downloaded from Rubyforge the
    > rubygems-1.3.1.tgz module, unpacked it, and launched its setup.rb
    > file. There was no console response other than a new command line. I
    > assume this is normal.
    >
    > Then....I issue a gem -v, and get back "1.2.0".
    >
    > I'm lost at this point. I thought I just installed v. 1.3.1.
    >
    > "which gem" produces "/usr/bin/gem".
    >
    > Looking there, I see both a "gem" and a "gem1.9".
    >
    > Oh boy. Two versions. "gem1.9 -v" also produces "1.2.0". Now I'm
    > really confused. And why "gem1.9"? What's THAT about?
    >
    > Being very suspicious at this point, I issue "which ruby1.9" and get
    > back "/usr/bin/ruby1.9". "ruby1.9 -v" produces "ruby 1.9.0 (2008-06-20
    > revision 17482) [i486-linux]". This is just nuts. I didn't install
    > this. Where did it come from?
    >
    > If I'm going to use my new Ruby 1.8.7 and want it to use the latest
    > rubygems, which I presume IS somewhere in my filesystem, what do I
    > need to do? Anything at all?
    >
    > Can someone please untangle this for me, so I can just get back to
    > work with my ruby learning...?
    >
    > Thanks (very much!) in advance.
    >
    > Tom
    >
    >
    >

    An update - thought I'd try to install a gem, just to see the response.
    It wasn't good, and I don't know what it means...

    $ sudo gem install RedCloth
    [sudo] password for tomc:
    Building native extensions. This could take a while...
    ERROR: Error installing RedCloth:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9 extconf.rb install RedCloth
    extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
    from extconf.rb:1:in `<main>'


    Gem files will remain installed in
    /var/lib/gems/1.9.0/gems/RedCloth-4.1.1 for inspection.
    Results logged to
    /var/lib/gems/1.9.0/gems/RedCloth-4.1.1/ext/redcloth_scan/gem_make.out
    tomc@tomc-desktop:~$

    I send this along simply thinking it may give additional useful information.

    Tom
     
    Tom Cloyd, Dec 13, 2008
    #2
    1. Advertising

  3. Tom Cloyd wrote:

    >> If I'm going to use my new Ruby 1.8.7 and want it to use the latest
    >> rubygems, which I presume IS somewhere in my filesystem, what do I
    >> need to do? Anything at all?


    You'll need to compile it without suffix (how escapes me right now, I'm
    afraid, but it is probably ./configure --no-suffix or something like
    that), and issue "make install" after you are done. However, the easiest
    way is possibly to apt-get install ruby1.8, and change any symlinks to
    ruby1.8, instead of ruby1.9, so that the ruby command is actually
    ruby1.8 (clear as mud?)

    And Ruby 1.9 could be used by Amarok, or Kubuntu's own scripts. However,
    multiple versions can co-exist somewhat happily (Depends on how the
    scripts by the 3rd party are written. If you are unlucky, they simply
    assume that /bin/ruby == /bin/ruby1.9 and could break).

    > An update - thought I'd try to install a gem, just to see the response.
    > It wasn't good, and I don't know what it means...
    >
    > $ sudo gem install RedCloth
    > [sudo] password for tomc:
    > Building native extensions. This could take a while...
    > ERROR: Error installing RedCloth:
    > ERROR: Failed to build gem native extension.
    >
    > /usr/bin/ruby1.9 extconf.rb install RedCloth
    > extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
    > from extconf.rb:1:in `<main>'
    >
    >
    > Gem files will remain installed in
    > /var/lib/gems/1.9.0/gems/RedCloth-4.1.1 for inspection.
    > Results logged to
    > /var/lib/gems/1.9.0/gems/RedCloth-4.1.1/ext/redcloth_scan/gem_make.out
    > tomc@tomc-desktop:~$
    >
    > I send this along simply thinking it may give additional useful
    > information.


    Sorta. For one, it shows that Ruby 1.8 was *not* installed. At least not
    properly. Do you have a ruby1.8 executable?

    Also, you'll have to install the build-essentials package to get a
    compiler toolchain.

    Cheers,
    -P

    P.S.: I'm not using Linux anymore, so take my help with a grain of salt.
     
    Phillip Gawlowski, Dec 14, 2008
    #3
  4. >
    > An update - thought I'd try to install a gem, just to see the response. It
    > wasn't good, and I don't know what it means...
    >
    > $ sudo gem install RedCloth
    > [sudo] password for tomc:
    > Building native extensions. This could take a while...
    > ERROR: Error installing RedCloth:
    > ERROR: Failed to build gem native extension.
    >
    > /usr/bin/ruby1.9 extconf.rb install RedCloth
    > extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
    > from extconf.rb:1:in `<main>'
    >
    >
    > Gem files will remain installed in /var/lib/gems/1.9.0/gems/RedCloth-4.1.1
    > for inspection.
    > Results logged to
    > /var/lib/gems/1.9.0/gems/RedCloth-4.1.1/ext/redcloth_scan/gem_make.out
    > tomc@tomc-desktop:~$
    >
    > I send this along simply thinking it may give additional useful information.
    >
    > Tom
    >
    >


    Is this thread any help?

    http://www.ruby-forum.com/topic/122871

    Harry

    --
    A Look into Japanese Ruby List in English
    http://www.kakueki.com/ruby/list.html
     
    Harry Kakueki, Dec 14, 2008
    #4
  5. Tom Cloyd

    Marc Heiler Guest

    > Looking there, I see both a "gem" and a "gem1.9".

    I still wonder why debian uses versioned binaries instead of versioned
    directories/AppDirs.
    --
    Posted via http://www.ruby-forum.com/.
     
    Marc Heiler, Dec 14, 2008
    #5
  6. Tom Cloyd

    Tom Cloyd Guest

    Marc Heiler wrote:
    >> Looking there, I see both a "gem" and a "gem1.9".
    >>

    >
    > I still wonder why debian uses versioned binaries instead of versioned
    > directories/AppDirs.
    >

    Even from my position of great ignorance, this seems like a good
    question. It does occur to me, however, that version-labeling the dirs
    along may not be safe enough in that their contents are not as
    positively labeled that way (unless I'm totally misunderstanding things
    here - in which case ignore me!).

    t.
     
    Tom Cloyd, Dec 14, 2008
    #6
  7. Tom Cloyd

    Tom Cloyd Guest

    Harry Kakueki wrote:
    >> An update - thought I'd try to install a gem, just to see the response. It
    >> wasn't good, and I don't know what it means...
    >>
    >> $ sudo gem install RedCloth
    >> [sudo] password for tomc:
    >> Building native extensions. This could take a while...
    >> ERROR: Error installing RedCloth:
    >> ERROR: Failed to build gem native extension.
    >>
    >> /usr/bin/ruby1.9 extconf.rb install RedCloth
    >> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
    >> from extconf.rb:1:in `<main>'
    >>
    >>
    >> Gem files will remain installed in /var/lib/gems/1.9.0/gems/RedCloth-4.1.1
    >> for inspection.
    >> Results logged to
    >> /var/lib/gems/1.9.0/gems/RedCloth-4.1.1/ext/redcloth_scan/gem_make.out
    >> tomc@tomc-desktop:~$
    >>
    >> I send this along simply thinking it may give additional useful information.
    >>
    >> Tom
    >>
    >>
    >>

    >
    > Is this thread any help?
    >
    > http://www.ruby-forum.com/topic/122871
    >
    > Harry
    >
    >

    I'm not sure. For one, I'm not confident I understand it. But if I do,
    the problem it addresses is a debian package problem, and I've install
    ruby 1.8.7 by compiling from source. I've verified the success of the
    compile. I get a ruby version of 1.8.7, and irb fires up, etc. My focus
    is now on the problem of getting a working install of rubygems. I'll
    address that in a separate email.

    Thanks.

    t.
     
    Tom Cloyd, Dec 14, 2008
    #7
  8. Tom Cloyd

    Eric Hodel Guest

    On Dec 12, 2008, at 19:05 PM, Tom Cloyd wrote:
    > I'm running Kubuntu Linux 8.10 - a fresh install. I'm setting up
    > Ruby now.
    >
    > I've done this before, but it takes very little for me to be in over
    > my head, so I need a quick review from someone who actually 'has a
    > clue'.
    >
    > I have just installed Ruby 1.8.7 from the source available at the
    > Ruby website. No problems. I then downloaded from Rubyforge the
    > rubygems-1.3.1.tgz module, unpacked it, and launched its setup.rb
    > file. There was no console response other than a new command line. I
    > assume this is normal.


    This is not normal. The output is exceedingly verbose by default
    (mkdir, install, and release notes).

    > Then....I issue a gem -v, and get back "1.2.0".
    >
    > I'm lost at this point. I thought I just installed v. 1.3.1.


    I suspect that you have another ruby installed with it's own RubyGems
    install. `gem env` may be illuminating.

    > "which gem" produces "/usr/bin/gem".
    >
    > Looking there, I see both a "gem" and a "gem1.9".
    >
    > Oh boy. Two versions. "gem1.9 -v" also produces "1.2.0". Now I'm
    > really confused. And why "gem1.9"? What's THAT about?
    >
    > Being very suspicious at this point, I issue "which ruby1.9" and get
    > back "/usr/bin/ruby1.9". "ruby1.9 -v" produces "ruby 1.9.0
    > (2008-06-20 revision 17482) [i486-linux]". This is just nuts. I
    > didn't install this. Where did it come from?
    >
    > If I'm going to use my new Ruby 1.8.7 and want it to use the latest
    > rubygems, which I presume IS somewhere in my filesystem, what do I
    > need to do? Anything at all?


    I suspect the ruby you built is in /usr/local/ and your PATH has /usr/
    bin before /usr/local/bin.

    > Can someone please untangle this for me, so I can just get back to
    > work with my ruby learning...?


    Uninstall any ruby that came with your OS and things should be fine.
    You may need to reinstall your hand-built ruby and rubygems, though.
     
    Eric Hodel, Dec 15, 2008
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JKop
    Replies:
    11
    Views:
    937
  2. Mike P
    Replies:
    0
    Views:
    3,380
    Mike P
    Jun 19, 2006
  3. Trevor
    Replies:
    5
    Views:
    602
    Bill Kelly
    Jan 29, 2005
  4. Erik Veenstra
    Replies:
    4
    Views:
    894
    Austin Ziegler
    Feb 4, 2005
  5. Eric Roscher
    Replies:
    3
    Views:
    391
    Eric Roscher
    Nov 24, 2009
Loading...

Share This Page