On Apr 7, 10:02 pm, Bruce Wilson <bwilson...@yahoo.com> wrote: > On Apr 7, 11:17 am, mainguy <mike.main...@gmail.com> wrote: > > > > > > > I don't see that you've routed anything to the '/' path. > > > Your route requires the controller to be in the path. > > > First step would be to uncomment this > > # You can have the root of your site routed with "root" > > # just remember to delete public/index.html. > > # root :to => "welcome#index" > > > replacing 'welcome' with the controller you want / to route to and > > index.html with the action. > > > Along those lines, usually there is a public/index.html that should > > be displayed. > > > Do you have a file in public/html? > > I'm following the instructions in Beginning Rails 3: > > $ rails generate controller salutation > Then I added a Hello method to the controller. > Then I created a hello.html.erb template in app/views/salutation. > > So the routes.rb file with this code: > > Hello::Application.routes.draw do > match ':controller(/:action(/:id(.:format)))' > end > > is supposed to deliver the desired result of "Hello World!". > > But I went ahead and changed the routes.rb file to read: > > Hello::Application.routes.draw do > root :to => "salutation#hello" > > That delivers the Hello World! in the browser, but along with the .erb > code: > > {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss > \fcharset0 Arial;}} {\*\generator Msftedit > 5.41.21.2509;}\viewkind4\uc1\pard\f0\fs20 \par \tab \par \tab\tab > Hello World! > \par \tab \par \par } > That looks like you edited your template with an editor that saved it as an rtf file rather than plain text.
Fred > What to do? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.