2009/10/6 Browny Lin <[email protected]>: > > > Thanks for your information, Marnen Laibow-Koser > > My rails is 2.3.4, I change the file "hello.rhtml" to "hello.html.erb" > > But the browser still just show the first line, and doesn't show > anything inside <%= XXX %>, do I miss something?
Make sure you have not got any other files hello.* in the view folder (backup files for example). Some versions of Rails have been confused by these. Temporarily remove hello.html.erb and make sure that it then complains it cannot find the file. This will make sure it is picking up the right one. What does the generated html look like (View, Page Source or similar in browser)? Post the relevant section here. Colin > > Many many thanks again > > > > > Marnen Laibow-Koser wrote: >> Marnen Laibow-Koser wrote: >>> Browny Lin wrote: >>>> I create a simple .rhtml file "hello.rhtml" in the "view" folder of the >>>> rails app. >> [...] >> >> Ack! Didn't notice this when posting the first time around...if you're >> using Rails 2.x, that should be hello.html.erb . If your tutorial is >> using the .rhtml extension, then it's out of date and you should follow >> another tutorial. >> >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> [email protected] > > -- > Posted via http://www.ruby-forum.com/. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

