Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > compiling ruby on linux

Reply
Thread Tools

compiling ruby on linux

 
 
Rustom Mody
Guest
Posts: n/a
 
      03-01-2007
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/.

 
Reply With Quote
 
 
 
 
Rick DeNatale
Guest
Posts: n/a
 
      03-01-2007
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/

 
Reply With Quote
 
 
 
 
Samantha
Guest
Posts: n/a
 
      03-02-2007
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/se...it=3DSearch+.=
=2E.
http://www.zlib.net/

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

http://greenprogrammer.blogspot.com/...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

 
Reply With Quote
 
Ken Bloom
Guest
Posts: n/a
 
      03-02-2007
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/
 
Reply With Quote
 
Ken Bloom
Guest
Posts: n/a
 
      03-02-2007
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/se...&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/
 
Reply With Quote
 
Tomas Pospisek's Mailing Lists
Guest
Posts: n/a
 
      03-02-2007
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
-----------------------------------------------------------

 
Reply With Quote
 
Rick DeNatale
Guest
Posts: n/a
 
      03-03-2007
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/

 
Reply With Quote
 
Rustom Mody
Guest
Posts: n/a
 
      03-23-2007
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/.

 
Reply With Quote
 
Phillip Gawlowski
Guest
Posts: n/a
 
      03-23-2007
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 09:47 PM
Cross-compiling error when compiling 2.6.1... Garrett Cooper Python 0 02-24-2009 08:55 PM
Re: Is Netscape Leaving Firefox Behind on GNU/Linux? THE LINUX PROPAGANDA MACHINE CONTINUES. FIREFOX IGNORING LINUX............. traci.manicotti@gmail.com Computer Support 2 10-20-2007 02:12 PM
compiling ruby on red hat linux Philip J. Mikal Ruby 14 09-09-2005 04:05 PM
Compiling when libedit is in path Is there a trick to compiling Ruby when libedit must exist in the search path? Can you statically link to readline 5.0 in some manner? -- Lon Baker Lon Baker Ruby 1 03-21-2005 08:57 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57