With Rails 4, the Welcome Aboard page is no longer in public/index.html . This, as you already discovered, is inside one of the Rails stones.
So, you yourself have answered the question; Welcome on board page - in your case - is located at /Users/7stud/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/templates/rails/welcome/index.html.erb
To get rid of it, follow the instructions on the page. Mainly:
- Create controller
- Add the root route to
config/routes.rb to route to this newly created controller.
As for how the request to your application ends on the controller inside the rails, letβs insert into the gem: Inside Rails::Application::Finisher we find this:
initializer :add_builtin_route do |app| if Rails.env.development? app.routes.append do get '/rails/info/properties' => "rails/info#properties" get '/rails/info/routes' => "rails/info#routes" get '/rails/info' => "rails/info#index" get '/' => "rails/welcome#index" end end end
This block adds several routes to your application when working in development mode - one of them is the route to the "Welcome aboard" action: get '/' => "rails/welcome#index"
This - like any other initializer - runs when your application server starts ( rails server runs, or how you do it). In the case of Finisher its entire initializer starts after all other initializers are started.
Notice how routes are added so that they are displayed last in Routeset. This, combined with the fact that Rails uses the first comparable route it finds, ensures that these default routes will only be used if no other route is defined.
Jakob S Jul 31 '13 at 8:19 2013-07-31 08:19
source share