Problem with root

Hi All,

I'm new in the ruby on rails world. I would like to ask you about any
advice according to this problem

I'm having problems with redirection, I have this line in the routes.rb

root :to => 'welcome#index', :as => 'home'

in the app/controllers folder I have welcome_controller.rb

and in the views/welcome/index.html.erb file

but when I use

I have the 404 page.

but if I use, it does work.


show us what happens when you run

tail -f log/development.log

in a console window while you hit the page in your browser

Hi Jason,

using this tail -f log/development.log, and then requesting the domain,
it does not show anything, but in the log of the site it does have these

Started GET "/index.html" for at 2014-11-24 12:47:46

ActionController::RoutingError (No route matches [GET] "/index.html"):
  actionpack (3.2.19)
lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  actionpack (3.2.19)
lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
  railties (3.2.19) lib/rails/rack/logger.rb:32:in `call_app'
  railties (3.2.19) lib/rails/rack/logger.rb:16:in `block in call'
  activesupport (3.2.19) lib/active_support/tagged_logging.rb:22:in
  railties (3.2.19) lib/rails/rack/logger.rb:16:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/request_id.rb:22:in
  rack (1.4.5) lib/rack/methodoverride.rb:21:in `call'
  rack (1.4.5) lib/rack/runtime.rb:17:in `call'
  activesupport (3.2.19)
lib/active_support/cache/strategy/local_cache.rb:72:in `call'
  rack (1.4.5) lib/rack/lock.rb:15:in `call'
  actionpack (3.2.19) lib/action_dispatch/middleware/static.rb:63:in
  rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward'
  rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch'
  rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup'
  rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!'
  rack-cache (1.2) lib/rack/cache/context.rb:51:in `call'
  railties (3.2.19) lib/rails/engine.rb:484:in `call'
  railties (3.2.19) lib/rails/application.rb:231:in `call'
  railties (3.2.19) lib/rails/railtie/configurable.rb:30:in
  passenger (4.0.53)
  passenger (4.0.53)
  passenger (4.0.53)
  passenger (4.0.53) lib/phusion_passenger/request_handler.rb:455:in
`block (3 levels) in start_threads'

Jason Fb wrote in post #1163214:

What does the Apache conf file look like for this host? Apache is trying to tack an auto-index on this page, which is messing with the route passed in from Passenger.

Here's a snippet from one of mine -- note the -Indexes directive. Does yours have that?

  <Directory /data/www/>
    Options -Indexes FollowSymLinks -MultiViews
    AllowOverride All
    Order allow,deny
    allow from all


Hi Walter this is mine:

<VirtualHost *:80>
    DocumentRoot /var/www/
    ErrorLog logs/redmine_error_log

   <Directory "/var/www/redmine/public/">
    Options -MultiViews Indexes ExecCGI FollowSymLinks
    Order allow,deny
    Allow from all
    AllowOverride all

if I set -Indexes, the site does not work at all.

Walter Davis wrote in post #1163219:

I got the solution of the problem,

in the .htaccess file I had this rule

RewriteRule ^$ index.html [QSA]

I comment it and now it works like a charm.

Thank you!

Francisco Bereciartu wrote in post #1163221: