PDA

View Full Version : Help with Ruby on Rails install on Linux


ponderosa
08-24-2010, 1:55 PM
Anyone know how to solve an issue I'm experiencing w/ installing Ruby on Rails on a Redhat EL3 ES server - I configure Ruby on Rails, then Make and it tells me I need a newer version of autoconf.

I go to install a newer version of autoconf and it won't configure, tells me I need a newer version of M4.

Go to install new M4 version and it configures but won't let me Make - gives me the error that i need a newer version of autoconf :confused:

If anyone can give me pointers to get this to work out, I'd be very grateful.

Thanks.

Oh, and I realize I should be running version 5 and not 3, but is it possible on 3?

PoofNoEyebrows
08-24-2010, 2:28 PM
This is pretty much standard when building in Linux. Do you have an option of using RPM? If so i would suggest that as it does a pretty good job predetermining all the package requirements.

ocabj
08-24-2010, 3:06 PM
This is an issue of dependencies. As far as the development tools, it's best not to rely on the system's default dev libraries/binaries, etc.

At work, we compile stuff into the /inst directory. For example, the latest autoconf is autoconf-2.67.tar.gz.

I'll usually DL the tarball and:

gzip -dc autoconf-2.67.tar.gz | tar xvf -
cd autoconf-2.67
./configure --prefix=/inst/pkg-ver/autoconf-2.67 (plus whatever options I need)
make
sudo make install

This will install autoconf into /inst/pkg-ver/autoconf-2.67

So when I compile m4, I'll have to:

./configure --prefix=/inst/pkg-ver/m4-x.x.x --/whatever_option_points_to_autoconf_dir=/inst/pkg-ver/autoconf-2.67

If there is no configure option to point to autoconf, you'll simply have to define the /inst/pkg-ver/autoconf-2.67/lib and /inst/pkg-ver/autoconf-2.67/include dirs in your LIB and INCLUDE environment for the m4 compile.

ponderosa
08-24-2010, 4:12 PM
Thx nobrows, I did find a rpm of an older version of Ruby on R. I may try that.

Thx ocabj, I think I am following you there, install packages utilizing newer dependent versions through switches or options.

Appreciated. I'll let you know how it goes.

ocabj
08-24-2010, 9:03 PM
I just reread your original post and my response technically won't solve your issue.

I'm not sure why you're getting issues with autoconf requiring a newer m4, but then m4 requiring a newer autoconf. Unless your autoconf and m4 are currently really old, then you may have to compile slightly older versions to get them somewhat updated, and then from there you can update both to the latest.

ponderosa
08-24-2010, 10:38 PM
...Unless your autoconf and m4 are currently really old, then you may have to compile slightly older versions to get them somewhat updated, and then from there you can update both to the latest.

I bet this is the issue. I'm going to look at it tomorrow and I will post back. Thanks for your time!

ponderosa
08-25-2010, 9:39 AM
Utilized an updated RPM for autoconf. Had to install byacc to get it to compile. m4 has been updated. I installed ruby and rubygems :) but rails won't install, getting a loaderror "no such file to load -- zlib".

This isn't making a great impression on me. If I had my druthers I'd stick to PHP.

So I'm installing zlib and will recompile ruby, then try to install rails again.

Oh boy.

0x80884
08-25-2010, 10:20 AM
Utilized an updated RPM for autoconf. Had to install byacc to get it to compile. m4 has been updated. I installed ruby and rubygems :) but rails won't install, getting a loaderror "no such file to load -- zlib".

This isn't making a great impression on me. If I had my druthers I'd stick to PHP.

So I'm installing zlib and will recompile ruby, then try to install rails again.

Oh boy.

Sounds more like an OS problem than a Ruby problem, but I'm a Python guy!
Why such an old version of RHEL? Any reason to not use CentOS (binary compatible) with a newer package tree?

kapache
08-25-2010, 10:29 AM
^CentOS much better.

ponderosa
08-25-2010, 11:05 AM
I'd have to migrate to an upgraded managed server to do that, not a bad idea overall, but would take too much time at the moment. Plus I'm a stubborn idiot at times and know this should be doable - and I know just enough to be dangerous :eek: with this stuff.

Installed zlib, but that didn't do me any good even after recompiling ruby and gems. So I found this trick:


# ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
# make
# make install

Then recompiled gems, then installed rails. And it appears to have worked! Crazy.

ocabj
08-25-2010, 12:22 PM
I'd have to migrate to an upgraded managed server to do that, not a bad idea overall, but would take too much time at the moment. Plus I'm a stubborn idiot at times and know this should be doable - and I know just enough to be dangerous :eek: with this stuff.

Installed zlib, but that didn't do me any good even after recompiling ruby and gems. So I found this trick:



Then recompiled gems, then installed rails. And it appears to have worked! Crazy.

I was actually going to respond earlier that you needed to reference the zlib dev libraries, not zlib itself. But you figured it out.

I understand your pain with regards to build environments. We use a lot of Solaris at work for our servers (physical/virtual) and the build environments are non-existent so there's a lot of manual dependency resolution.

ponderosa
08-25-2010, 3:10 PM
I was actually going to respond earlier that you needed to reference the zlib dev libraries, not zlib itself. But you figured it out.

I understand your pain with regards to build environments. We use a lot of Solaris at work for our servers (physical/virtual) and the build environments are non-existent so there's a lot of manual dependency resolution.

Appreciate your posts, your post above helped lead me there.

Now to figure all this out ;)

The plan is to install Spree and see how that goes for a variation of ecommerce.

locosway
08-25-2010, 3:30 PM
Save yourself a lot of headaches and run Debian or Ubuntu for the server. Especially if you're going to be doing Rails stuff with cutting edge technology.

sfwdiy
08-26-2010, 11:19 AM
ugghh.... Dependency hell. No thanks.

--B

sepiid
08-26-2010, 11:33 AM
im sure glad i dont manage the linux servers i used too.

i now manage windows servers and let me say it has been a little slice of heaven so far.