using ruby on rails via jailshell

RawG

Member
May 2, 2004
17
1
153
Hey everyone,

I've had a request from a client to install ruby on rails. I've successfully downloaded, compiled and installed the required tarballs, and everything works fine from anywhere on the filesystem, so long as I'm logged in as root (eg. I can run 'rails testapp', and it creates me a skeleton rails app).

If I login to my test user account and get a jailshell prompt, I'm not able to execute either 'ruby' or 'rails', I just get a "command not found" error. I have the ruby binaries installed at /usr/local/ruby/bin, with symlinks to ruby (etc) in /usr/local/bin. I've checked my PATH (`echo $PATH`) and I've got the right directories listed there.. so I'm unsure as to why I am recieving these "command not found" errors.

Has anyone else had any experience with this kind of issue? What changes to I need to make in order to make ruby and rails available from jailshell?

Thanks in advance...
 

RawG

Member
May 2, 2004
17
1
153
OK... so I've just heard back from cPanel support... easy solution:

when building ruby, the configure command should be run as:

./configure --prefix=/usr/local --exec-prefix=/usr/local

NOT

./configure --prefix=/usr/local/ruby --exec-prefix=/usr/local/ruby

the second configure command being how most installation guides for ruby on rails will tell you to do it.

Works great now!
 
  • Like
Reactions: Drew Nichols

BraveX

Well-Known Member
Apr 8, 2005
155
0
166
Thanks for sharing.

I'm wondering if Ruby can be used without needing shell access? We're thinking of offering it but don't allow shell access on the server. Is there a way around that?

Thanks,
BX
 

peter77

Registered
Mar 24, 2006
3
0
151
For a production environment yes. :)

But you have to left some nice features a side.

You cannot use migrations or any other rake tasks, so you have to make db changes by .sql files.

http://onrails.com.ar