Results 1 to 2 of 2

Thread: Anyone using Ruby on Rails RoR?

  1. #1
    mm2001 is offline Newbie
    Join Date
    Oct 2007
    Posts
    2

    Default Anyone using Ruby on Rails RoR?

    I'm having problems with the RoR support, even just geting a sample app running. Anyone else using this, any tips?

    I'm having trouble getting my test ruby app to respond (and the others). E.g. for the Ruby app Test I remapped to /test/ and the app responds as far as giving a 404 error from the 404 file in the public_html/test/public/404.html.

    I switched from production to development mode, and now I can see some errors, e.g.:

    http://mydomain.com/test/ gives the error:

    Routing Error

    no route found to match "/test/" with {:method=>:get}

    whereas when I run it on my machine locally, I get the same ruby welcome page that appears at Ruby on Rails: Welcome aboard. If I try:

    http://mydomain.com/test/hello

    I get the almost identical error:

    Routing Error

    no route found to match "/test/hello" with {:method=>:get}

    Whereas again when I try on my local machine with http://localhost:3000/hello, then I get the following as expected:

    Hello#index

    Find me in app/views/hello/index.rhtml

    It seems that something still isn't configured quite right, but I admit to being enough of a ruby neophyte that perhaps I'm missing something obvious?

    tia!

  2. #2
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    6,208

    Default

    The main problem we are seeing with people who have developed their RoR applications on their local PC using WEBrick / InstanRails is that they are expecting to see their RoR apps to show up at domain.com:3000 and with cPanel the port number used is much higher, and from what I can tell, not needed due to the redirection function found in the cPanel interface.

    The other main problem is the shebang line in the scripts is generally set to the path to ruby on the local machine, typically something like:

    #!D:/InstantRails/ruby/bin/ruby
    #!C:/InstantRails/ruby/bin/ruby

    The path to Ruby on the on the server is actually:

    #!/usr/bin/ruby

    (Thanks to Sergey for figuring this out)

    So none of the libs are found because the scripts are misconfigured.

    I think the best solution here is to develop the scripts on the server side, or, if you are adept in Ruby to make the path to Ruby a variable which can be configured to use your Windows /path/to/ruby when developing locally and the Unix /path/to/ruby when the app is running on the remote server.

    This functionality may already be built into your application but the ones I have looked at seem to have the path in each individual file instead of using one variable, in one file, then the whole app could be easily reconfigured.

    The good news is we are now offering jail shells to those that want or need them to help assist in RoR development. it has not been officially announced yet, however if you need one just open a support ticket and we will enable it on your account.

    We will have a "Hello World" tutorial for RoR on cPanel in these forums in a day or so and I will be sure to link it from this thread so people have an idea of how to get a simple RoR application up and running on cPanel, and can take it from there.
    Last edited by Matt; 10-28-2007 at 12:49 PM.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | Follow us on X |

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14