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.

How do you run a Ruby on Rails application after you create it with cPanel

Discussion in 'General Discussion' started by gajennings, Apr 28, 2012.

  1. gajennings

    gajennings Registered

    Joined:
    Apr 28, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    I created a Rail app, created a rewrite. When I go to the URL I get this wonderful screen that says: "Welcome Aboard, You're riding Ruby on Rails!"

    If the link "About your application's environment" results in a 404, does that mean ROR is not fully installed? (I.e. there is no "rails" directory on the webserver.

    Appending 'script/generate' to my URL results in a blank screen, as does 'script/about'.

    So what's next? How can I possibly troubleshoot this? I only have cPanal and FTP access to my website. I access it with a MAC.

    After reading some wonderful PDF (by Mat Dees I think) and read some other docs online, but they all stop after the "create the app" part.

    So, I have a "Welcome Aboard, You're riding Ruby on Rails!" app but can do nothing with it. What/how/where next?
     
    #1 gajennings, Apr 28, 2012
    Last edited: Apr 28, 2012
  2. gajennings

    gajennings Registered

    Joined:
    Apr 28, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Re: How do you run a Ruby on Rails application after you create it with cPa

    Well, I downloaded the 'script' and 'public' directories and took a look at the code. Here is a tidbit:

    #!/usr/bin/env ruby
    require File.expand_path('../../config/boot', __FILE__)
    require 'commands/generate'

    Turns out that '../../config' does not exist. Perhaps I'll just mention all this to my hosting provider and have them make sure Rails is installed properly.

    But still, the lack of documentation of how RoR works at this level (i.e. dirs, files, etc.) is unfortunate.
     
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Re: How do you run a Ruby on Rails application after you create it with cPa

    Hello,

    The environmental details portion really doesn't matter. It doesn't mean that the application isn't working properly.

    As for the application, you'd want to begin coding using a guide such as the following one:

    Ruby on Rails guides

    The guide is based on Rails 2.3.11 rather than 2.3.14 that we provide, but the basics should be approximately the same with those versions.

    The path to the rails files will be /home/username/rails_apps/appname where appname is the Rails application you've created.

    Please note that there are no coding guides we provide to users (we don't provide coding guides for any programming languages such as perl, PHP, ASP.net or JSP either). Development work would be outside the control panel options. We provide the option to use the coding language and it's up to the user to develop in that language.

    Thanks!
     
  4. gajennings

    gajennings Registered

    Joined:
    Apr 28, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Re: How do you run a Ruby on Rails application after you create it with cPa

    Then I asked this questions in the wrong place; sorry.

    Its was my understanding that RoR "just works" -- it does not. It appeard to be a "normal" programming environment in which I write Ruby code and put it up on the sever. BFD.

     
  5. gajennings

    gajennings Registered

    Joined:
    Apr 28, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Re: How do you run a Ruby on Rails application after you create it with cPa

    Sorry to be back bothing you, but... The application, as I stated Does Not Work!

    I get what you say below, thank you. But the mentions guide says that I need Shell Access?!?!? That I need to yun the command:

    'gem rails'

    To "install Rails." ?!??!?

    None of the scripts in my application work. This is not right. Sorry. It should just work.

    And if the link in my application "About your application's environment" results in a 404, will shelling in an running 'gem rails' fix that?

     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Re: How do you run a Ruby on Rails application after you create it with cPa

    Rails is already installed. That guide isn't on the cPanel environment. It was an example guide online on how to code in Ruby using Rails framework. You'd need to take the code in the guide after the application creation to learn how to program using Ruby on Rails. I provided it as an example on where you can start to learn the language and framework.

    When you state none of the scripts in your application work, which scripts? The default container doesn't contain any scripts, so which scripts were added that aren't working?

    As for just working, PHP doesn't "just work", Tomcat doesn't "just work". You have to add code pages (even if they are "Hello world" ones) to get a working page. Rails is installed. You've created a blank container with the application. Now, you either need to add the coding pages or find an existing script (such as Redmine or Typo) and install it into the folder. That part is up to you.

    Now, if you install an application and need help with an error message for a script you've created, please feel free to post it here. Otherwise, if you need help programming to learn the language, please feel free to post onto the numerous Rails sites.
     
Loading...

Share This Page