开发者

Local installation of ruby / rubygems with no root access

开发者 https://www.devze.com 2022-12-14 18:08 出处:网络
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

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开发者_如何学Go 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.


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.


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号