My Rails application name is Card. I have modified the routes and removed the index.html from public directory. Still I see The page you were looking for doesn't exist.
when I visit my home page. Rake routes displays the root route correctly.
I am using Passenger with Apache.
root@emaillenin:/var/emaillenin/rails/card# cat config/routes.rb
Card::Application.routes.draw do
root :to => "home#index"
end
root@emaillenin:/var/emaillenin/rails/card# ls public/
404.html 422.html 500.html favicon.ico robots.txt
root@emaillenin:/var/emaillenin/rails/card# rake routes
root / home#index
root@emaillenin:/var/emaillenin/rails/card# ls app/controllers/
application_controller.rb home_controller.rb
root@emaillenin:/var/emaillenin/rails/card# cat app/controllers/home_controller.rb
class HomeController < ApplicationController
def index
end
end
root@emaillenin:/var/emaillenin/rails/card# cat app/views/home/index.html.erb
<h1>Home#index</h1>
<p>Find me in app/views/home/index.html.erb</p>
<h1>Hello, Rails!</h1>
root@emaillenin:/var/emaillenin/rails/card# bundle exec rake assets:precompile
/usr/local/rvm/rubies/ruby-2.0.0-p195/bin/ruby /usr/local/rvm/gems/ruby-2.0.0-p195@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
root@emaillenin:/var/emaillenin/rails/card# cat config/environments/production.rb | grep config.assets.compile
config.assets.compile = true
root@emaillenin:/var/emaillenin/rails/card#
This is what I see in the Apache error log: ActionController::RoutingError (No route matches [GET] "/"):
When I do rails server
and access my homepage via 3000 port, I see an error page - http://pastebin.com/1eEU3egt
Even after executing bundle exec rake assets:precompile
I see the same error page.
Even after changing config.assets.compile to true results in the same error.
Any way to crack down this issue?