centos and ruby 1.9.1 - possible?

  • Thread starter Älphä Blüë
  • Start date
Ã

Älphä Blüë

I hate even typing the question but my vps template has centos
unfortunately. So, I'm looking for instructions on how to install ruby
with centos and yum...

Anyone have some solutions for me - advice?
 
Ã

Älphä Blüë

I'm leaving the provider I signed up with. They don't offer any other
linux distros on VPS so don't bother responding (unless you happen to
know how to get centos up and running).

My end result here is that the better linux distro to use is ubuntu and
I'll find a provider that supports my needs.
 
E

EricF

I'm leaving the provider I signed up with. They don't offer any other
linux distros on VPS so don't bother responding (unless you happen to
know how to get centos up and running).

My end result here is that the better linux distro to use is ubuntu and
I'll find a provider that supports my needs.
Centos is a great distro! But if you don't like it, get another.

Eric
 
J

James Britt

Älphä Blüë said:
I hate even typing the question but my vps template has centos
unfortunately. So, I'm looking for instructions on how to install ruby
with centos and yum...

Anyone have some solutions for me - advice?


Build from source?


--
James Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development
 
Ã

Älphä Blüë

James said:
Build from source?

Again, my problem is there's very little documentation out there for
centos and how to accomplish this.

For instance, on Ubuntu if I need to do this I know which apts I'll need
to get before compiling from source. On Centos, those same apts don't
appear to apply.

Unless someone can provide me a link to a detailed step-by-step that
shows me how to accomplish a build from source, then I can't use centos.
It really comes down to familiarity and I spent 12 hours scouring and
searching the web yesterday for anything centos related.

My VPS template uses Centos 4.5 (final), most other people are using
Centos 5.x. That's problem number 1.

My VPS uses yum and I'm not all that familiar with yum. I installed apt
and couldn't get going with that on centos either. That's problem
number 2.

When I attempted a compile it failed because much of the dependencies
were not already built on the distro. I compiled from 1.9.1 source but
zlib, openssl, etc. - all of those failed. When I tried to update zlib
it said I had the latest available already but I noticed that the
version was "old". So, where do I get the latest zlib?

Again, the issues kept coming over and over. I went on IRC to try to
see if someone would help in ruby and rubyrails channels and everyone
that spoke to me laughed at me when I mentioned centos and ruby... No
one was helpful or understanding given my situation.

Yes, I'm a newbie when it comes to linux but I help others. I don't
like to reach out for help on certain subjects but sometimes you just
have to do it in order to learn. My list of resources for centos and my
familiarity with centos can be accumulated in these paragraphs,
unfortunately...

If someone wants to open my eyes to something I haven't yet discovered
and help me out - great! But, saying it's a great distro is just an
opinion that doesn't help me out with the issues I'm facing. I'd love
to keep what I have if I could accomplish what it is I need to do.

But, that doesn't appear to be the case here.
 
R

Robert Klemme

2009/6/10 =C3=84lph=C3=A4 Bl=C3=BC=C3=AB said:
Again, my problem is there's very little documentation out there for
centos and how to accomplish this.

For instance, on Ubuntu if I need to do this I know which apts I'll need
to get before compiling from source. =C2=A0On Centos, those same apts don= 't
appear to apply.

Might be because CentOS uses a different package manager... :)
Unless someone can provide me a link to a detailed step-by-step that
shows me how to accomplish a build from source, then I can't use centos.

Did you try the steps provided in README (in the source directory of
the source distribution package you get from ruby-lang).
It really comes down to familiarity and I spent 12 hours scouring and
searching the web yesterday for anything centos related.

That must have been frustrating.
My VPS template uses Centos 4.5 (final), most other people are using
Centos 5.x. =C2=A0That's problem number 1.

My VPS uses yum and I'm not all that familiar with yum. =C2=A0I installed= apt
and couldn't get going with that on centos either. =C2=A0That's problem
number 2.

"man yum" or "yum --help" did not work? yum has worked pretty well
for me so far so I never felt the need to install another package
manager.
When I attempted a compile it failed because much of the dependencies
were not already built on the distro. =C2=A0I compiled from 1.9.1 source = but
zlib, openssl, etc. - all of those failed. =C2=A0When I tried to update z= lib
it said I had the latest available already but I noticed that the
version was "old". =C2=A0So, where do I get the latest zlib?

Can you post the errors you got from "configure" or "make"? On my
CentOS 5 (and also earlier on 4 IIRC) I did not have any issues
compiling.

Note that yum can tell you which package contains a specific file if
your error announces that a file (e.g. library) is missing (see
"whatprovides" in the man page).
If someone wants to open my eyes to something I haven't yet discovered
and help me out - great! =C2=A0But, saying it's a great distro is just an
opinion that doesn't help me out with the issues I'm facing.

But it might tell you that others do not have that problem and it's
probably not something about the distribution but your particular
installation. This can be a crucial bit of information at times.

Cheers

robert

--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
 
Ã

Älphä Blüë

Thanks for the feedback Robert. My biggest issue (which I failed to
list here) is I'm a windows system administrator. I'm very windows
oriented. For instance, I have 1.9.1 and a full working mysql/sqlite3
rails environment on windows and was able to get through every hoop and
hurdle to do it. I'm even halfway finished with a Vstudio 8 compile of
1.9.1 on windows, (lacking about 6 more libaries at the moment).

When I go over to linux I feel like a hobo in the dark fishing for a
wine bottle in an aligator pit. I really hate using the terms "newbie"
or "ignorant" or even "clueless" in the same terms where discussing my
name and development. But, I have to own up to the fact that my
experience with linux is raw...

With windows I can turn around and tell you right from the start which
OS's are great (what the pluses and cons are for them), what big issues
you are going to face in terms of development with X product.. On
Linux, CentOS, Debian, Ubuntu, etc. are just names to me. I couldn't
begin to tell you which one is the best or what the pluses or cons are
for each. So, I just go by what my VPS provider gave me and try to work
with what I have.

However, I think my biggest issue is just the learning curve. I need a
provider that is going to have all of the foundations in place for me to
begin. So far, Slicehost is my leanto on the provider.

I will more than likely stick with Ubuntu as my familiarity with apt,
build from source, and package management on that distro is getting
better.

On the flipside, my brother-in-law works for Red Hat and is a developer.
I thought I could lean on him to help me with some issues but he knows I
come from windows. He's running as far away from me as possible..
 
K

Kyle Schmitt

OK to start with, know that CentOS is a RedHat Enterprise Linux (RHEL)
clone. A very good one at that, we use it on many of the machines
where I work. Remember, any packages or tutorials or howtos for RHEL
will work for CentOS of the same version (RHEL4.7->CentOS4,.7).

<Off Topic>
As a linux sysadmin I'd actually advise against using Ubuntu, since it
hides almost everything from the user and the admin both. It treats
the users & sysadmins like mushrooms. Using it, you may never learn
how things work. If you want to learn how things work & get things
done at the same time, stick with CentOS (if you really want to dig
down into it and don't mind not getting things done right away, get
Slackware, ArchLinux or Crux).
</Off Topic>


Back to CentOS.
it does use yum for automated package management, but down at the very
bottom of it all, it uses RPM. You don't have to add new repositories
to YUM if you don't want to, you can just download and install the RPM
you want.

Unfortunately I can't find any ruby1.9 RPMs either.... so your best
bet is just building from source.

Don't worry about turning it into an RPM: you only need to do that if
you're going to be putting it on many machines!

Don't worry about upgrading it later: You're home-compiled version
will live in /usr/local/[bin|lib|share] which will make it easy to
blow away later if needed.

Building this from scratch will require a little patience. Mostly,
you'll be running the configure, waiting for it to error about some
header or another missing, installing the dev package, and repeating.
It'll be like this

bash$ ./configure --program-suffix=1.9
wait for the error to come up --
Check to see if you have what it's missing --
bash$ rpm -q -a|grep -i "library-name"
Chances are it'll be there, but the dev package will be missing --
Install the development package (which is just header files & the like) --
repeat until ./configure gives you no errors

Hope that helps a bit

--Kyle
 
K

Kyle Schmitt

Just re-read this message, make sure you've got the development
packages for openssl and zlib installed, as well as any other dev
packages for libraries you want to use (gdbm& sqlite would be good
examples).

CentOS 4.x is old, we only use it where we need an Oracle approved install.
4.5 is very old, you may want to upgrade to 4.7, it could make life
easier (but upgrading to 5.3 would make it a LOT easier).

You can tell configure to not check the zlib version, which may or may
not be safe, depending on what will be exposed to the outside world.
If for example you're writing a web-app where people can upload
compressed files for whatever reason, it would be very very dangerous.
On the other hand if you're never touching zlib, you may be able to
ignore it.
 
J

James Britt

Älphä Blüë said:
Again, my problem is there's very little documentation out there for
centos and how to accomplish this.

For instance, on Ubuntu if I need to do this I know which apts I'll need
to get before compiling from source. On Centos, those same apts don't
appear to apply.


I have a Centos4 machine I look after. It is *really* annoying.

What I've learned:

yum is pretty much like apt-get. Try yum search <some name> to see
what's available.

Centos repos are way out of date (likely because they want to be sure
all items play nice)

If you want something new (such as MySQL 5), you need to add new repos
to the repo lists. You have to Google around to get the details.

I'm pretty sure that building ruby mostly means wget'ing the source and
reading the INSTALL file.

You *may* have trouble with zlib and ssl, but I *think* you can get the
devel packages for those via yum.

Google for help on installing Ruby 1.8.x on CentOS; it's pretty much the
same deal.

Also, for your Windows box, go grab a free version of VMWare and install
CentOS 4 so you can play around safely.



--
James Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development
 
J

Joel VanderWerf

James said:
I have a Centos4 machine I look after. It is *really* annoying.

What I've learned:

yum is pretty much like apt-get. Try yum search <some name> to see
what's available.

Centos repos are way out of date (likely because they want to be sure
all items play nice)

Centos 5 is also out of date on ruby, so I always just build from source:

$ lsb_release -d
Description: CentOS release 5.3 (Final)
$ yum info ruby.i386 |grep Ver
Version : 1.8.5
 
Ã

Älphä Blüë

Okay, if I decided to upgrade my 4.5 centos to 5.3 - what would be
involved - any ideas?
 
K

Kyle Schmitt

I've not tried a streight upgrade, but it may work. Otherwise it's
just a re-install.
Ruby is still out of date with 5.3, and there aren't any good rpms for
ruby1.9 I've found, so you'll still build from source, but it should
be easier.

--Kyle
 
J

Joel VanderWerf

Älphä Blüë said:
Okay, if I decided to upgrade my 4.5 centos to 5.3 - what would be
involved - any ideas?

but then you'd still be stuck with an obsolete ruby in the default
repos, no?
 
A

Aaron Turner

Okay, if I decided to upgrade my 4.5 centos to 5.3 - what would be
involved - any ideas?

FYI, I just got the green light with my company to release a ruby
1.9.1 src.rpm for CentOS/RHEL4. Should be easy to port to
CentOS/RHEL5 if someone needed that.

I need to do a quick test/clean up before I release... should be later
today. Should work fine on Intel, but I haven't done any 64bit or
testing on other archs.

This RPM is designed to allow ruby 1.9 to fully co-exist w/ the system
provided 1.8.

--=20
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Win=
dows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
-- Benjamin Franklin
 
K

Kyle Schmitt

but then you'd still be stuck with an obsolete ruby in the default repos,
no?

Yes, but 3 things
1) 1.9 is still not %100 stable, it's still a moving target.
2) 5.x is insanely easier to maintain than 4.x
3) the dependent libraries are more up to date, so compiling from
source should be easier for both ruby & any gems or ruby libs that are
wanted.
 
J

Joel VanderWerf

Kyle said:
Yes, but 3 things
1) 1.9 is still not %100 stable, it's still a moving target.
2) 5.x is insanely easier to maintain than 4.x
3) the dependent libraries are more up to date, so compiling from
source should be easier for both ruby & any gems or ruby libs that are
wanted.

Very good points!
 

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

Forum statistics

Threads
473,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top