[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

compiling ruby on linux

rustom

3/1/2007 6:18:00 PM

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-....

8 Answers

Rick DeNatale

3/1/2007 7:15:00 PM

0

On 3/1/07, Rustom Mody <rustompmody@gmail.com> 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.denh...

Samantha

3/2/2007 1:12:00 AM

0

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&subm......
http://www...

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

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

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

--
Samantha

http://www.bab...

"Beware when the great God lets loose a thinker on this planet. Then
all things are at risk."
  --Ralph Waldo Emerson

Ken Bloom

3/2/2007 2:08:00 AM

0

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...

Ken Bloom

3/2/2007 4:08:00 AM

0

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&sub...
+...

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...

Tomas Pospisek

3/2/2007 10:18:00 AM

0

Rick DeNatale

3/3/2007 4:45:00 PM

0

On 3/1/07, Ken Bloom <kbloom@gmail.com> 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.denh...

rustom

3/23/2007 4:11:00 AM

0

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.ph...

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

--
Posted via http://www.ruby-....

Phillip Gawlowski

3/23/2007 4:32:00 AM

0

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.