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.

Ruby on Rails: Not Found. The requested URL /rails/info/properties was not found

Discussion in 'General Discussion' started by devbau.com, Sep 8, 2009.

  1. devbau.com

    devbau.com Registered

    Joined:
    Sep 8, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I would like to share the problem and solution to this which is related with creation of Ruby on Rails applications trough cPanel.

    I love Redmine application, which is probably the best freeware application for software projects management. You can read more about Redmine on their website www.redmine.org

    I have successfully earlier installed Redmine applications on dedicated server on period April - August 2009. But i encountered problems now on Spetember 2009. I believe the issue is related with some cPanel update.

    PROBLEM
    I give to you entire scenario how you can repeat the error. I'm trying to give exact details, it might sound boring, but I have sometimes customer calls or contact where they are describing their problem with words: "Everything is not working." by hoping that I can help them. So its important to know the pathway to the problem, as problem solves itself, when we remove the reasons.

    1. Create a new Ruby on Rails application. Click on Ruby on Rails button on cPanel. Enter new application name, for example testruby, check load on boot option and select production option. And press Create button. Message: "Your app is installed, its name is testruby" should appear.
    2. Run new application testruby. Click on run button and wait a minute after the message "The following Ruby on Rails application was started: testruby" appear. Its important to wait a bit, as otherwise it does not show that your app is running. And go back to Ruby on Rails applications page.
    3. Test new application. Click on URL link on behind your new application name and path. A new page should open with message "Welcome aboard", which show that your new application is running. Go back now to the Ruby on Rails application page and Create a URL rewrite for your new app. Choose desired domain or subomain. (If needed create the subdomain before) and click Save.
    4. Restart new app. Use command buttons Stop and Run for app to restart it.
    5. Test app again. Instead of clicking on URL link on behind your new application name and path, open new browser tab or window and enter your redirection domain.. A new page should open with message "Welcome aboard", which show that your new application is running. But you dont see any more graphics (images).
    6. Test redirection. Click on link About your application’s environment. and you will get error: "Not Found. The requested URL /rails/info/properties was not found on this server."

    If you dont get an error: "Not Found. The requested URL /rails/info/properties was not found on this server.", then everything is fine with your cPanel installation. If you got this error, then you probably scratching your head how to solve it?

    SOLUTION
    Problem is, that cPanel generates invalid redirection commands in .htaccess file in you domain directory.

    Probably it generates something similar:

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^subdomain.mydomain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.subdomain.mydomain.com$
    RewriteRule ^/?$ "http\:\/\/127\.0\.0\.1\:12009%{REQUEST_URI}" [P,QSA,L]
    Last row on code above is invalid. Correct code is below:

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^subdomain.mydomain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.subdomain.mydomain.com$
    RewriteRule ^.*$ "http\:\/\/127\.0\.0\.1\:12009%{REQUEST_URI}" [P,QSA,L]
    Probably you noticed the difference ^/?$ <> ^.*$ already.

    I don't know why it does so, but this problem occurred on this month first time. So I believe its related to some cPanel update.

    I hope message above was helpful.
     
  2. MattCurry

    MattCurry Well-Known Member

    Joined:
    Aug 18, 2009
    Messages:
    275
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Tx
    Rails: Not Found

    Hello,

    Thank you for the information.

    Matthew Curry
     
  3. KrystalS

    KrystalS Active Member

    Joined:
    Mar 15, 2004
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    UK
    Can you get this fixed? It's happening to all new rails applications - surely it's a 2 min job to fix the auto generated .htaccess file code?
     
  4. ivanoats

    ivanoats Member

    Joined:
    Feb 20, 2006
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Seattle, Washington, United States
    Please fix this or post a workaround

    Has this been fixed yet? Is there a work around? Can we just edit a template file somewhere on the server?

    Thanks,
    Ivan
     
  5. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Please try the latest CURRENT build of cPanel/WHM; after upgrading, please remove the redirect, manually check the .htaccess file to verify, then re-create the redirect using cPanel.

    There is a related fix that is available in v11.25, and at the time of writing in build trees EDGE and CURRENT, as seen by the following change log entry:
    http://changelog.cpanel.net/?tree=current
     
    #5 cPanelDon, Oct 12, 2009
    Last edited: Oct 12, 2009
  6. KrystalS

    KrystalS Active Member

    Joined:
    Mar 15, 2004
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    UK
    FYI

    Encountered the same problem again today :

    cPanel 11.24.5-R38506 - WHM 11.24.2 - X 3.9
    REDHAT Enterprise 5.4 i686 standard



    code generated :

     
  7. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Please carefully refer to the last message detailing the suggested solution for the redirect issue:
    cPanel Forums - View Single Post - Ruby on Rails: Not Found.
     
  8. ddeo

    ddeo Active Member

    Joined:
    Sep 4, 2007
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    Hi, I am having this same problem with redirecting ROR apps. I am uncomforable to upgrade to the CURRENT release because I don't want the fear of any instability. I would rather wait until this fix goes into STABLE. Is there any time table for this?

    Also, can I just edit the .htaccess file to make it work? I am a little confused because my rewrite code looks different then the about suggestion:

    Code:
    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^domain.net$ [OR]
    RewriteCond %{HTTP_HOST} ^www.domain.net$
    RewriteRule ^store "http\:\/\/127\.0\.0\.1\:12002%{REQUEST_URI}" [P,QSA,L]
    
    The redirect should go to "store". I tried changing the rule to:
    Code:
    ^.store*
    but that did not work either. Can anyone help me change the code correctly? Thanks, Ddeo
     
  9. ddeo

    ddeo Active Member

    Joined:
    Sep 4, 2007
    Messages:
    38
    Likes Received:
    0
    Trophy Points:
    6
    I tried this too but it did not work:

    Code:
    RewriteRule ^/store$ "http\:\/\/127\.0\.0\.1\:12002%{REQUEST_URI}" [P,QSA,L]
     
  10. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Yes, Apache ".htaccess" files may be edited manually to create or modify a redirect.

    Regarding an ETA please refer to the following: cPanel 11.25 - cPanel Forums

    Please do not cross-post about the same issue.
     
Loading...

Share This Page