compiling ruby on linux

Discussion in 'Ruby' started by Rustom Mody, Mar 1, 2007.

  1. Rustom Mody

    Rustom Mody Guest

    I need to use ruby 1.8.5 whereas the linux I am using -- ubuntu edgy --
    gives 1.8.4.

    Tried to download sources and compile.

    Seemed to go fine but when I tried to setup gem it barfed saying the
    zlib library is not available

    Also the up-arrow key is not working in irb

    So any pointers to compiling ruby on ubuntu-edgy?

    --
    Posted via http://www.ruby-forum.com/.
     
    Rustom Mody, Mar 1, 2007
    #1
    1. Advertising

  2. On 3/1/07, Rustom Mody <> wrote:
    > I need to use ruby 1.8.5 whereas the linux I am using -- ubuntu edgy --
    > gives 1.8.4.
    >
    > Tried to download sources and compile.
    >
    > Seemed to go fine but when I tried to setup gem it barfed saying the
    > zlib library is not available
    >
    > Also the up-arrow key is not working in irb
    >
    > So any pointers to compiling ruby on ubuntu-edgy?


    I've found it to be a bit of a puzzle session.

    Generally ruby compiles fine, but various extensions require the
    system to have a variety of external files. It's usually a bit of
    trial and error to figure out which files are needed and then which
    debian/ubuntu packages provide those files.

    You'll find that the source distribution has a directory called ext
    which in turn has a subdirectory for each extension. So look in
    ext/zlib in your source directory for a file called mkmf.log this
    should contain a log of what tests were done when building the zlib
    extension. You're likely to find that one or more files (probably .h
    files, or perhaps library files) were missing. Then try to figure out
    which debian packages you need. Google is the obvious tool for this.
    There's also a nice tool called apt-file (in a package of the same
    name) which can be used to search for files in packages on the
    repositories.

    Your problem with up-arrow in irb is probably due to a similar problem
    building the readline extension.

    HTH.
    --
    Rick DeNatale

    My blog on Ruby
    http://talklikeaduck.denhaven2.com/
     
    Rick DeNatale, Mar 1, 2007
    #2
    1. Advertising

  3. Rustom Mody

    Samantha Guest

    On Thursday 01 March 2007 01:18:03 pm Rustom Mody wrote:
    > I need to use ruby 1.8.5 whereas the linux I am using -- ubuntu edgy --
    > gives 1.8.4.
    >
    > Tried to download sources and compile.
    >
    > Seemed to go fine but when I tried to setup gem it barfed saying the
    > zlib library is not available
    >
    > Also the up-arrow key is not working in irb
    >
    > So any pointers to compiling ruby on ubuntu-edgy?



    Have you tried installing zlib?

    http://rpmfind.net/linux/rpm2html/search.php?query=3Dzlib&submit=3DSearch .=
    =2E.
    http://www.zlib.net/

    Btw, I did a google for zlib ubunty edgy and came across this...

    http://greenprogrammer.blogspot.com/2006/05/ruby-wreadline-on-ubuntu.html

    Not sure if it applies, but it's worth a shot. :)

    =2D-=20
    Samantha

    http://www.babygeek.org/

    "Beware when the great God lets loose a thinker on this planet. Then
    all things are at risk."
    =C2=A0 --Ralph Waldo Emerson
     
    Samantha, Mar 2, 2007
    #3
  4. Rustom Mody

    Ken Bloom Guest

    On Fri, 02 Mar 2007 03:18:03 +0900, Rustom Mody wrote:

    > I need to use ruby 1.8.5 whereas the linux I am using -- ubuntu edgy --
    > gives 1.8.4.
    >
    > Tried to download sources and compile.
    >
    > Seemed to go fine but when I tried to setup gem it barfed saying the
    > zlib library is not available
    >
    > Also the up-arrow key is not working in irb
    >
    > So any pointers to compiling ruby on ubuntu-edgy?


    First off, you can install ruby on Ubuntu by running "apt-get install
    ruby". If you can't do that because you're trying to compile some more
    recent version of ruby, then you can pull in Ruby's build dependancies by
    running "apt-get build-dep ruby1.8" which should install everything you
    need to compile Ruby. (Also be sure to install build-essential if you
    haven't already done so -- I think you have otherwise you wouldn't have
    made it this far.)

    --Ken

    --
    Ken Bloom. PhD candidate. Linguistic Cognition Laboratory.
    Department of Computer Science. Illinois Institute of Technology.
    http://www.iit.edu/~kbloom1/
     
    Ken Bloom, Mar 2, 2007
    #4
  5. Rustom Mody

    Ken Bloom Guest

    On Fri, 02 Mar 2007 10:12:19 +0900, Samantha wrote:

    > On Thursday 01 March 2007 01:18:03 pm Rustom Mody wrote:
    >> I need to use ruby 1.8.5 whereas the linux I am using -- ubuntu edgy --
    >> gives 1.8.4.
    >>
    >> Tried to download sources and compile.
    >>
    >> Seemed to go fine but when I tried to setup gem it barfed saying the
    >> zlib library is not available
    >>
    >> Also the up-arrow key is not working in irb
    >>
    >> So any pointers to compiling ruby on ubuntu-edgy?

    >
    >
    > Have you tried installing zlib?
    >
    > http://rpmfind.net/linux/rpm2html/search.php?query=zlib&submit=Search

    +...

    If you're suggesting rpmfind.net, then you don't know the first thing
    about Ubuntu. Ubuntu is a Debian derivative, so all you need to do is apt-
    get install whatever you want.


    --
    Ken Bloom. PhD candidate. Linguistic Cognition Laboratory.
    Department of Computer Science. Illinois Institute of Technology.
    http://www.iit.edu/~kbloom1/
     
    Ken Bloom, Mar 2, 2007
    #5
  6. On Fri, 2 Mar 2007, Samantha wrote:

    On Thursday 01 March 2007 01:18:03 pm Rustom Mody wrote:
    > I need to use ruby 1.8.5 whereas the linux I am using -- ubuntu edgy --
    > gives 1.8.4.
    >
    > Tried to download sources and compile.
    >
    > Seemed to go fine but when I tried to setup gem it barfed saying the
    > zlib library is not available
    >
    > Also the up-arrow key is not working in irb
    >
    > So any pointers to compiling ruby on ubuntu-edgy?


    I don't know about Ubuntu, but Debian has 1.8.5 in unstable. In Debian the
    procedure to build an "unstable" version on stable would be:

    # vim /etc/apt/sources.list
    # # add a source line for unstable sources
    # apt-get install build-dep ruby1.8
    # apt-get source ruby1.8
    # cd ruby1.8*
    # debuild

    *t

    --
    -----------------------------------------------------------
    Tomas Pospisek
    http://sourcepole.com - Linux & Open Source Solutions
    -----------------------------------------------------------
     
    Tomas Pospisek's Mailing Lists, Mar 2, 2007
    #6
  7. On 3/1/07, Ken Bloom <> wrote:

    > First off, you can install ruby on Ubuntu by running "apt-get install
    > ruby".


    Personally, I've given up on using the debian packaged ruby and the
    ubuntu versions thereof for a variety of reasons besides being back
    level.

    The biggie is that debian doesn't really support gems properly,
    there's a raging disagreement between the way gem structures its files
    and the debian philosophy.

    I was also quite surprised when I discovered that the debian package
    for rails actually replaces the original rails ruby script with a bash
    script.

    --
    Rick DeNatale

    My blog on Ruby
    http://talklikeaduck.denhaven2.com/
     
    Rick DeNatale, Mar 3, 2007
    #7
  8. Rustom Mody

    Rustom Mody Guest

    Thanks all for all the posts. I learnt something from each of these.
    However I still cannot compile ruby on ubuntu.
    Strangely it compiles easily on debian ?!
    I posted a question on the ubuntu compiling forum thinking that that is
    more suitable for compiling ruby on ubuntu than the ruby-forum. However
    since there is no reply I am cross-posting (the link) here
    http://ubuntuforums.org/showthread.php?t=389055

    I should also mention that I tried Thomas Popisek's debuild approach
    which also didn't work.

    --
    Posted via http://www.ruby-forum.com/.
     
    Rustom Mody, Mar 23, 2007
    #8
  9. Ken Bloom wrote:

    > If you're suggesting rpmfind.net, then you don't know the first thing
    > about Ubuntu. Ubuntu is a Debian derivative, so all you need to do is apt-
    > get install whatever you want.


    Unless it is not in the standard repos, installed by default in the
    sources.lst.

    --
    Phillip "CynicalRyan" Gawlowski

    Rule of Open-Source Programming #13:

    Your first release can always be improved upon.
     
    Phillip Gawlowski, Mar 23, 2007
    #9
    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. Mark Chavira
    Replies:
    1
    Views:
    2,265
    Gordon Beaton
    Jan 22, 2004
  2. Garrett Cooper
    Replies:
    0
    Views:
    566
    Garrett Cooper
    Feb 24, 2009
  3. Garrett Cooper
    Replies:
    0
    Views:
    504
    Garrett Cooper
    Feb 24, 2009
  4. Lon Baker
    Replies:
    1
    Views:
    227
    Csaba Henk
    Mar 21, 2005
  5. Philip J. Mikal

    compiling ruby on red hat linux

    Philip J. Mikal, Sep 8, 2005, in forum: Ruby
    Replies:
    14
    Views:
    236
    Philip J. Mikal
    Sep 9, 2005
Loading...

Share This Page