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!
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.