Getting Started with Rails possible mistaken deletion in updated doc

It looks like the Getting Started with Rails doc has been updated since I first looked at it two days ago. I’m working through the doc, and the changes are for the most part helpful. However, in the version I was reading on Jan 2, section 4 included the instruction to delete the public/index.html file after creating the home_controller (named welcome_controller in the new version). The current version on the site leaves out the instruction to delete public/index. I thought maybe this had been an unnecessary step, since the new doc seems to imply that the root to: command in the routes file sets the page shown by default when pointing the browser to localhost:3000.

Unfortunately, this isn’t the case; When I followed the directions in the new doc (changing the root to line to read root to: “welcome#index”) I was still routed to the public/index page. Because the old doc had talked about deleting public/index, I tried that and it worked. However, if I were new to this doc, I think I’d find it frustrating to follow the directions and still be seeing the original welcome page. And since there’s no mention anywhere in the doc of the public/index file, I’m not sure about how a new user would figure this out.

Perhaps there’s a newer version of Rails that doesn’t default to public/index but uses root to: as the default? If so, let me know!

Hi Marlene,

Maybe you are looking at http://edgeguides.rubyonrails.org/getting_started.html instead of http://guides.rubyonrails.org/getting_started.html , the one in edgeguides is for the edge version of rails and has changes that correspond to what will end up being Rails 4, the one in guides.rubyonrails.org is the current one for Rails 3.2. I have just checked and the current guide still mentions removing the public/index.html file but the edge guide doesn’t, maybe that’s why you don’t see it anymore.

cheers,

Amaia

In master public/index.html is gone, Rails 4 no longer generates that static file and that is why the edge guide has changed in that regard.

There is a Rails::WelcomeController bundled in railties that serves the root unless overridden in the routes configuration.

See Use Rails to Render Default Index Page · rails/rails@baea5d6 · GitHub.

The Getting started guide at http://guides.rubyonrails.org/v3.2.13/getting_started.html still contains the error. The routes.rb file that is being generated by the system contains the commented code as # root :to => ‘welcome#index’.

If anyone could change that to ‘home#index’ it would be a lot less confusing for starters with rails 3.2x

I have gone through the starter guide for 4.x and its totally awesome. Especially the way its presented. Cheers!

PS: The text shows me half the post in bold. Sorry but ‘Google Groups’ seems to be acting strange.