How to make a linux custom install location work - no sudo

I need to get a custom install of Ruby to work quickly on Redhat linux.
I don’t have sudo so I need to get this to work under my home dir.
Compiling went fine and basic ruby runs.

Ruby is installed at: /home/skrot/ruby-2.2.3

Here is how I tried to configure Ruby specific env variables to
make this work:

[[email protected] drstuff]$ env |grep -i ru
PATH=/home/skrot/ruby-2.2.3:/home/skrot/ruby-2.2.3/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/skrot/bin
RUBYLIB=/home/skrot/ruby-2.2.3:/home/skrot/ruby-2.2.3/lib:/home/skrot/ruby-2.2.3/ext

The ruby binary seems to work:
[[email protected] drstuff]$ ruby --version
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]

This is obviously insufficient. My ruby based program dies as well as
the ‘gem’ program

[[email protected] drstuff]$ ./ruby-dependent-program
/home/skrot/ruby-2.2.3/lib/rubygems.rb:9:in require': cannot load such file -- thread (LoadError) from /home/skrot/ruby-2.2.3/lib/rubygems.rb:9:in<top (required)>’
from internal:gem_prelude:1:in require' from <internal:gem_prelude>:1:in

[[email protected] drstuff]$ gem
/home/skrot/ruby-2.2.3/lib/rubygems.rb:9:in require': cannot load such file -- thread (LoadError) from /home/skrot/ruby-2.2.3/lib/rubygems.rb:9:in<top (required)>’
from internal:gem_prelude:1:in require' from <internal:gem_prelude>:1:in

Is there a way I can fix this by making more environment variable
updates?

Or otherwise, is there a way I can get this version of Ruby to work in
an install within my home directory?

Did you tried rvm. As I remember it works per user.

by
TheR

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs