views:

196

answers:

3

Hi,

I have a machine at work from wich I'd like to run a script that gathers some information about other machines. I want to do it in Ruby, since it's what I know best, but I've ran into some problems, all apparently due to the same reason: I don't have root access in this machine.

So what I did was: Download ruby source, configure (with --prefix pointing to somewhere under my home dir), make, make install. Alright, ruby runs fine. Then I did the same with rubygems and installed it. Ok as well, untill I went to install my first gem.

I downloaded the gem package (sigh, lots of firewalls, can't just "gem install" something remote), net-ssh, and tried to install it locally. Got the infamous "no such file to load -- zlib". Clues about this led nowhere, so I tried the next approach: getting net-ssh's source. When it tries to require 'openssl' (or when I try it from irb), I get "no such file to load -- openssl".

All of these problems, apparently, could be solved by apt-getting or rpm installing, or whatever. Only problem is: I can't!

Any suggestions as to how I might proceed?

Thanks for the help, Marcelo.

A: 

Did you try Ruby RVM? You can download, compile and install a full-featured Ruby version on your home environment.

Simone Carletti
Thanks for the reply. It seemed like a good idea, and I have just spent about an hour trying it out and reading about it, but rvm tries to install its rubies from the internet. Firewall restrictions here won't let it download stuff. There has to be a way for me to download stuff from their websites myself and copy them to the server.Thanks for the help, though.
malvim
A: 

Closing this now.

I had to ask someone with root access to install zlib-devel and openssl-devel (I'm on RHEL). Couldn't make it otherwise.

I'm guessing there's probably a way of using the stuff inside said packages without installing them as root, but I couldn't do it.

malvim
A: 

I recently did the same. The trick that worked for me is NOT to use a --prefix flag when you install rubygems.

invariant
Well, I added the --prefix flag to my Ruby installation. Rubygems just used whatever path ruby had.
malvim