Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 521369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:14:36+00:00 2026-05-13T08:14:36+00:00

Edit: Well maybe this can give a clue. When created a Rails app in

  • 0

Edit:

Well maybe this can give a clue. When created a Rails app in cPanel on my web host, in order to access the app you need to create a rewrite rule. Which I did, but didn’t know what it did. I tracked it down to it creating the following 2 files:

home/mydomain/public_html/.htaccess:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mydomain.com$
RewriteRule ^/?$ "http\:\/\/127\.0\.0\.1\:12030%{REQUEST_URI}" [P,QSA,L]

and

home/mydomain/.cpanel/ruby-on-rails-rewrites.db:

  appname: helloworld
  domain: mydomain.com
  port: 12030
  rewritebasepath: /home/mydomain/public_html
  url: 

It seems that the root URL gets sent to Rails, but any other URL does not and I get an Apache 404 (not a Rails 404). Is there something wrong in the .htaccess file?
Is the rewrite condition only for the domain root? If it is, how can I make it for any URL ?

Original post:

I’m trying to deploy a rails website that works fine locally but not on the web server.
The rails app starts fine and I can access the home page. But any other link results in a 404.

My home page is set from within routes.rb like so:

  map.root :controller => "home"

I am using RESTful routes and it works fine locally. In routes.rb all I have is a bunch of

map.resources :posts
map.resources :images

…

If I change the map.root to another controller (i.e map.root :controller => "posts", then that single page will display fine as well, and all other links will return 404s, including the one that previously worked when it was the one referenced in map.root.

This is my first rails deployment so it might be me doing something wrong. My web host tech support told me it’s a coding issue and that they can’t help me.

My website directory structure online is like so:

/home/mydomain/etc/rails_apps/mysitedir/  <- rails folders (app, config, db, ...)
/home/mydomain/public_html/  <- nothing here

Also, the files that are in my rails public folder, do they need to stay in that folder or should they be put in the public_html folder on the web? Because right now they’re not found either. If I put them in the public_html folder though, they are found from the home page (javascript and css and images).

In my error log in cPanel, it shows errors like:

[Mon Oct 05 08:19:41 2009] [error] [client XX.XX.XX.XX]
File does not exist: /home/mydomain/public_html/market,
referer: http://www.mydomain.com/

Where market is one of the links I’m trying to access from my home page, for example, and it’s one of my controllers.

In short, the only location I can access is the root.

What am I doing wrong that I am getting all these 404s?
I do not have shell access, all I have is cPanel. This is with Ruby 1.8.5 and Rails 2.3.4, the (shared) web server is Linux + Apache 2.2.11 (Unix).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:14:36+00:00Added an answer on May 13, 2026 at 8:14 am

    The problem is with my web host. Still hasn’t been resolved by them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT : It turned out that this can only be done through an external
Ok, maybe this is the dumbest question ever but I really can't understand what's
Ok maybe I am just tired because of this but how can I accomplish
Maybe there's someone out in the ether that can help me with this one.
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
In order to have a well scrambled table (for a psychological experiment), I'd like
Edit: This may be a 5.0-specific bug. (I'm on 5.0.83). Removing the innodb_log_file_size setting
EDIT: I rephrased the question because I have not explained well. Let's see if
I am a bit lost. Maybe it's that I don't understand jQuery that well
A VERY nice to have would be if I could edit object-literals in this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.