compiling ruby on linux

R

Rustom Mody

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?
 
R

Rick DeNatale

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

Samantha

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
 
K

Ken Bloom

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
 
T

Tomas Pospisek's Mailing Lists

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
 
R

Rick DeNatale

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

Rustom Mody

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

Phillip Gawlowski

Ken said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top