The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

using ruby on rails via jailshell

Discussion in 'General Discussion' started by RawG, Sep 8, 2005.

  1. RawG

    RawG Member

    Joined:
    May 2, 2004
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    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...
     
  2. RawG

    RawG Member

    Joined:
    May 2, 2004
    Messages:
    17
    Likes Received:
    1
    Trophy Points:
    3
    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!
     
    Drew Nichols likes this.
  3. BraveX

    BraveX Well-Known Member

    Joined:
    Apr 8, 2005
    Messages:
    155
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  4. peter77

    peter77 Registered

    Joined:
    Mar 24, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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
     
Loading...

Share This Page