Welcome Guest | Login

404 Error - Page Not Found



This is a wiki article created by HostingRails users. Please login or signup to make edits.


This thread is devoted to help those of you who may be seeing a 404 error and wish to make it go away.



You are seeing this error because requests are not making it through .htaccess or simply not obtaining a response from a file within your account.


Possible reasons (and solutions) for this error are:
  • Subfolder Woes - If you're running your app as a subfolder and you do not have the RewriteBase set in your .htaccess you'll get a 404.  Plus if you don't have the relative_url_root set in your environment.rb then you won't be able to browse through your controllers and actions. Furthermore, you need to have a Rewrite rule set up in your main app's .htaccess to allow requests to be sent to your subfolder.  Click here to learn how to do all this.

  • Symlink Troubles - A request may not be finding a file because a symlink is not set up correctly.  Remember that in:
    [~]# ln -s A B
     
    'A' must be an existing location and 'B' must be a NON-existing location.  That is, you are creating B as a symbolic link to A.... B should not already be there.  

    With an account running multiple Rails apps in subfolders, subdomains, and/or addon domains (click here to learn how to do this) there will be multiple symlinks set up.  If something goes wrong here 404s will show up.  

    To remove a symlink use:
    [~]# rm B


  • Has anyone seen other reasons for a 404 in Rails applications?



If you're still having trouble, please feel free to ask a question in our deployment troubleshooting forum and/or update the content here for the next developer.



Hello Guest! In order to edit this article you must be an active client with us, please log in or sign up today!






Contributing Author(s):
William