On 16 Oct 2008, at 01:32, Adam Hurlburt wrote:
> > Frederick Cheung wrote: >> On Oct 15, 3:49�am, Adam Hurlburt <[EMAIL PROTECTED] >> s.net> >> wrote: >>> configure it with mod rails? >> Why aren't you just letting rails render your templates? >> >> Fred > > Im sorry Im really knew to rails, what are these templates and how > do I > render them with rails. It sounds to me like you just want to dump some rhtml templates somewhere and have ruby render them. That's fine, but that's fundamentally not how rails work. Rails applications have a very specific structure. Your app splits into models, typically wrappers round a database table, controllers which sit between the outside world and your models, and views which are the .rhtml (now usually named .html.erb) files you were worrying about. Apache never touches a .rhtml file directly - it hands the request over to a rails worker (a mongrel, a fastcgi instance, a mod_rails instance) which does a bunch of stuff (which may include rendering one of the app's rhtml templates) and passes the response back I could waffle about this more, but I think that you would have more to gain by reading one of the many rails tutorials (make sure you pick a fairly recent one). I'd also advise that you forget about apache for a second. webrick/mongrel (which you can launch by running ruby script/server from the root of our app) are more than enough to get you going. > > I am also wondering is there any advantage to using rails if I write > my > own login script / use the DBI module for database connectivity? It > seems from what I have heard that rails is primarily useful due to its > easy of deployment. I want to become more familiar with rails > because I > keep hearing good things about it and it seems like it is quickly > becoming very popular so I am just wondering what are the specific > benefits? > While there are many great things about rails, I wouldn't call ease of deployment its main strength (if anything historically it has been what puts people off). Fred > Thanks, > > Adam > -- > 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 -~----------~----~----~----~------~----~------~--~---

