Problem with Ruby Installation

Discussion in 'Ruby' started by Michael Satterwhite, Aug 6, 2006.

  1. I'm running Ubuntu Breezy. Because of some problems with the version of
    Rails distributed with it, I've compiled ruby 1.8.4 and installed it -
    and have removed the version from the distribution.

    I'm now getting the error

    require': no such file to load -- rubygems (LoadError)

    This tells me that there are other things I need to install, too.
    Definitely this one, and probably some others that I'm not aware of
    (yet). Keeping in mind that I'm an old hand at computing (35 years) and
    very new to ruby; what seems obvious to you might never dawn on me.

    Would some of you guru's be so kind as to help me (a) fix the above
    problem and (b) point out some of the other things I need to install -
    like mysql gateways, etc. Pointing me at where to get them would be
    greatly appreciated, too.

    Thanks in advance
    ---Michael

    --
    Posted via http://www.ruby-forum.com/.
    Michael Satterwhite, Aug 6, 2006
    #1
    1. Advertising

  2. > require': no such file to load -- rubygems (LoadError)
    >
    > Would some of you guru's be so kind as to help me (a) fix the
    > above problem and (b) point out some of the other things I
    > need to install - like mysql gateways, etc. Pointing me at
    > where to get them would be greatly appreciated, too.


    RubyGems is the de facto way to distribute Ruby
    packages/addons/extensions/libraries/whatever. Even RubyGems is
    distribute as a gem. The first problem for you to solve is
    bootstrapping this loop. The process of installing RubyGems by
    hand is explained in [1].

    Once that is done, you can use "gem search mysql -r" to find
    the gem you want and use "gem install mysql" to install this
    stone.

    Life easy, when you know how where to start...

    gegroet,
    Erik V. - http://www.erikveen.dds.nl/

    [1] http://www.rubygems.org/read/chapter/3
    Erik Veenstra, Aug 6, 2006
    #2
    1. Advertising

  3. On 8/6/06, Michael Satterwhite <> wrote:
    > I'm running Ubuntu Breezy. Because of some problems with the version of
    > Rails distributed with it, I've compiled ruby 1.8.4 and installed it -
    > and have removed the version from the distribution.


    It's unclear from what you wrote whether you also removed the Ubuntu
    rails package, but if not, I'd recommend doing that as well and
    installing rails as a gem, after you've followed Erik's advice.

    The debian packaging of Rails (and therefore Ubuntu's as well) is a
    bit of a hack. The debian guys aren't happy about where ruby-gems
    puts its files so they don't package ruby-gems. Back when I had the
    ubuntu/debian rails package installed, it looked like theyd they'd
    actually rewritten the rails installer as a bash script!

    --
    Rick DeNatale
    Rick DeNatale, Aug 6, 2006
    #3
  4. Erik Veenstra wrote:

    > RubyGems is the de facto way to distribute Ruby
    > packages/addons/extensions/libraries/whatever. Even RubyGems is
    > distribute as a gem. The first problem for you to solve is
    > bootstrapping this loop. The process of installing RubyGems by
    > hand is explained in [1].
    >
    > Once that is done, you can use "gem search mysql -r" to find
    > the gem you want and use "gem install mysql" to install this
    > stone.
    >
    > Life easy, when you know how where to start...


    ...and I'll admit to being new enough that I have *NO IDEA* where to
    start. <g>

    I went to the site you referenced and downloaded rubygems 0.9.0. I
    untarred it, went to the directory and (as root) ran ruby setup.rb -
    which is what the site said to do. It ran a bit, then gave me the
    following error:

    /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
    `gem_original_require': no such file to load -- zlib (LoadError)

    I did see the note about installing libzlib, but when I tell apt to do
    so, it says that it is installed and at the latest version. Obviously
    something is still missing.

    All help *GREATLY* appreciated.
    ---Michael

    --
    Posted via http://www.ruby-forum.com/.
    Michael Satterwhite, Aug 6, 2006
    #4
  5. What's the output of this?:

    $ find `ruby -r rbconfig -e 'puts Config::CONFIG["archdir"]'` | grep
    -wie zlib

    gegroet,
    Erik V. - http://www.erikveen.dds.nl/
    Erik Veenstra, Aug 6, 2006
    #5
  6. Erik Veenstra wrote:
    > What's the output of this?:
    >
    > $ find `ruby -r rbconfig -e 'puts Config::CONFIG["archdir"]'` | grep
    > -wie zlib


    I think you've put your finger on the problem. The above command has no
    output. Looking closer, I see that ruby is apparently looking for
    zlib.so under /usr/local/lib/ruby/1.8/i686-linux.

    The library is actually under /usr/lib/ruby/1.8/i486-linux/zlib.so (as
    placed by my distribution). This, of course, brings up the question of
    how to correct this. I need to either (a) Tell ruby where the libraries
    are, (b) Move the libraries to where ruby thinks they are, or (c)
    Recompile ruby to be in /usr/bin - which is where the distribution put
    it. To me, (c) looks the least error prone - but I'm sure willing to
    listen to other suggestions. Almost everyone here knows more about ruby
    than I do.

    Thanks - and all help is appreciated
    ---Michael

    --
    Posted via http://www.ruby-forum.com/.
    Michael Satterwhite, Aug 7, 2006
    #6
  7. Aaron Kulbe wrote:
    > You may have done some of this already, so disregard the parts that
    > already
    > apply:
    >


    >
    > then sudo make install
    >
    > Cheers,
    >
    > Aaron Kulbe


    Aaron,

    If you're ever in the Houston, Texas area, I owe you a lunch.

    Next question (for Aaron or anyone):
    The Ubuntu distribution release of the mysql driver for ruby doesn't
    seem to work with a compiled version of ruby. I tried installing it with


    --
    Posted via http://www.ruby-forum.com/.
    Michael Satterwhite, Aug 7, 2006
    #7
  8. Michael Satterwhite wrote:
    > Aaron Kulbe wrote:
    >> You may have done some of this already, so disregard the parts that
    >> already
    >> apply:
    >>

    >
    >>
    >> then sudo make install
    >>
    >> Cheers,
    >>
    >> Aaron Kulbe

    >
    > Aaron,
    >
    > If you're ever in the Houston, Texas area, I owe you a lunch.
    >
    > Next question (for Aaron or anyone):
    > The Ubuntu distribution release of the mysql driver for ruby doesn't
    > seem to work with a compiled version of ruby. I tried installing it with


    sudo gem install mysql

    It asks me which version to install, and I chose the latest non-windows
    version. It then runs a bit and I get the following error

    Could not create Makefile due to some reason, probably lack of
    necessary libraries and/or headers. Check the mkmf.log file for more
    details. You may need configuration options.

    I'm sure this tells those of you who have been around a bit a lot, but
    I'm brand new to gems. How do I address getting the mysql library up.
    Also, are there other gems that I should consider installing as well.

    Thanks again
    ---Michael


    --
    Posted via http://www.ruby-forum.com/.
    Michael Satterwhite, Aug 7, 2006
    #8
  9. > sudo gem install mysql
    >
    > Could not create Makefile due to some reason, probably lack
    > of necessary libraries and/or headers. Check the mkmf.log
    > file for more details. You may need configuration options.


    Well, uh, what does mkmf.log tell you?... ;]

    Have you installed the MySQL development packages? You can find
    them with "apt-cache search mysql | grep -ie mysql.*dev".

    > I'm sure this tells those of you who have been around a bit a
    > lot, but I'm brand new to gems. How do I address getting the
    > mysql library up. Also, are there other gems that I should
    > consider installing as well.


    Lesson one when installing Ruby on Ubuntu: Remove all default
    Ruby packages that come with Ubuntu and compile everything
    yourself.

    gegroet,
    Erik V. - http://www.erikveen.dds.nl/
    Erik Veenstra, Aug 7, 2006
    #9
  10. Erik Veenstra wrote:
    >
    > Lesson one when installing Ruby on Ubuntu: Remove all default
    > Ruby packages that come with Ubuntu and compile everything
    > yourself.


    When you install Ruby from source it would be better to include
    --prefix=/usr/local/ruby

    And update your path to include /usr/local/ruby/bin before /usr/bin and
    you don't have to worry about what ever packages have been installed for
    your distro.
    Cliff Cyphers, Aug 7, 2006
    #10
    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. Ihab Mentiady

    Ruby installation problem on UNIX

    Ihab Mentiady, Aug 5, 2003, in forum: Ruby
    Replies:
    2
    Views:
    128
    Kero van Gelder
    Aug 7, 2003
  2. Alexey Verkhovsky
    Replies:
    1
    Views:
    218
    WATANABE Hirofumi
    Oct 5, 2004
  3. Wolfgang Nádasi-Donner

    Ruby 1.9 mswin32 Installation and a Problem

    Wolfgang Nádasi-Donner, Jul 22, 2005, in forum: Ruby
    Replies:
    2
    Views:
    88
    Wolfgang Nádasi-Donner
    Jul 22, 2005
  4. Replies:
    1
    Views:
    164
    Ken Bloom
    May 28, 2007
  5. YAG
    Replies:
    2
    Views:
    152
    Ron Fox
    Apr 4, 2008
Loading...

Share This Page