I''d like to find some information on the high-level control flow of Rails. Currently, my understanding is that The request comes into the server. It gets routed to a controller. The appropriate view gets processed, using the appropriate templates, etc. This is a bit vague and mystical for my taste. Has someone written up a description of the principal methods that make all of this work? If so, I''d love to see it! -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm-go8te9J4rpw@public.gmane.org http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Look up Model-View-Controller in Wikipedia :) -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
At 6:47 AM +0100 1/28/07, Mick Sharpe wrote:> Look up Model-View-Controller in Wikipedia :)-1 I''m quite familiar with the overall principles of MVC. What I''m looking for is a high-level description of the way that Rails implements its version of MVC. -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm-go8te9J4rpw@public.gmane.org http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I can''t think of anything offhand - most of the information available is of a how-to nature rather than theoretical. Have you looked at the Rolling with Ruby on Rails articles on the O''Reilly website? It may be worth your while getting a copy of the Agile Web Development with Rails book and working through the tutorials. I think this will give you a much better idea of how Rails works than any high-level overview. It shouldn''t take more than a day. Alternatively, you could re-post in the Rails core forum - you may get a more sensible answer there. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I put an overview on: http://rtfm.calicowebdev.com/articles I hope it''s useful. Steve Rich Morin wrote:> > > I''d like to find some information on the high-level control > flow of Rails. Currently, my understanding is that > > The request comes into the server. > > It gets routed to a controller. > > The appropriate view gets processed, using the appropriate > templates, etc. > > This is a bit vague and mystical for my taste. Has someone > written up a description of the principal methods that make > all of this work? If so, I''d love to see it! > > -r > -- > http://www.cfcl.com/rdm Rich Morin > http://www.cfcl.com/rdm/resume rdm-go8te9J4rpw@public.gmane.org > http://www.cfcl.com/rdm/weblog +1 650-873-7841 > > Technical editing and writing, programming, and web development > > > > >-- View this message in context: http://www.nabble.com/-Rails--info-on-high-level-control-flow-of-Rails--tf3130213.html#a8673374 Sent from the RubyOnRails Users mailing list archive at Nabble.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
At 7:27 AM +0100 1/28/07, Mick Sharpe wrote:> I can''t think of anything offhand - most of the information > available is of a how-to nature rather than theoretical.That is my impression, as well.> Have you looked at the Rolling with Ruby on Rails articles > on the O''Reilly website?Yes> It may be worth your while getting a copy of the Agile Web > Development with Rails book and working through the tutorials.I went through the tutorials in the first edition, a few months ago. I''m now most of the way through the tutorials in the second edition (which is greatly improved, IMHO).> I think this will give you a much better idea of how Rails works > than any high-level overview.Actually AWDwR provides very little information on the internal workings of Rails. It''s mostly "put this here, put that there, and voila, it all works". This isn''t bad, but it doesn''t serve my need for information on HOW it all works.> Alternatively, you could re-post in the Rails core forum - you > may get a more sensible answer there.I''ll consider that; thanks. -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm-go8te9J4rpw@public.gmane.org http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
At 10:47 PM -0800 1/27/07, s.ross wrote:> I put an overview on: > > http://rtfm.calicowebdev.com/articles > > I hope it''s useful.Yes, it is, although I wish you would put up a "print- friendly" version. However, there''s still a lot of "passive voice" being used, as: "Controller Code Invoked" "View Rendered" What routines do the invocation and rendering? Who is responsible for bringing in layouts, etc? Like that... -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm-go8te9J4rpw@public.gmane.org http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
These aren''t high-level questions at all. What routines invoke controllers? I don''t think you''ll ever need this, but you can trace the codepath quite easily in the Rails source to see that Dispatcher::dispatch determines the actual controller by running the request through the routing logic. ActionController::process is the base class method that gets that name of the action (as it says in the comments) from the request parameters and then runs the corresponding action. Rich Morin wrote:> > > At 10:47 PM -0800 1/27/07, s.ross wrote: >> I put an overview on: >> >> http://rtfm.calicowebdev.com/articles >> >> I hope it''s useful. > > Yes, it is, although I wish you would put up a "print- > friendly" version. However, there''s still a lot of > "passive voice" being used, as: > > "Controller Code Invoked" > > "View Rendered" > > What routines do the invocation and rendering? Who is > responsible for bringing in layouts, etc? Like that... > > -r > -- > http://www.cfcl.com/rdm Rich Morin > http://www.cfcl.com/rdm/resume rdm-go8te9J4rpw@public.gmane.org > http://www.cfcl.com/rdm/weblog +1 650-873-7841 > > Technical editing and writing, programming, and web development > > > > >-- View this message in context: http://www.nabble.com/-Rails--info-on-high-level-control-flow-of-Rails--tf3130213.html#a8673483 Sent from the RubyOnRails Users mailing list archive at Nabble.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It looks like public/dispatch.{cgi,fcgi,rb} are the first bits of Ruby code that get executed in Rails, depending on the execution environment. Is this the case? If so, why might system(''/usr/bin/touch /tmp/t1'') in them be failing to act? Details: This is in a Locomotive environment on Mac OS X. % which touch /usr/bin/touch -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm-go8te9J4rpw@public.gmane.org http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I think what you need is chapter 2 of the "Ruby for Rails" book by David A. Black. I''ve been working on Rails for a while now however I just bought the book yesterday. I''ve been through the first chapter only and what a mistake I made by not reading this book before starting working with Rails. I think this should be the starting point for anyone starting Rails development. Hope this helps. On Jan 28, 8:39 am, Rich Morin <r...-go8te9J4rpw@public.gmane.org> wrote:> I''d like to find some information on the high-level control > flow of Rails. Currently, my understanding is that > > The request comes into the server. > > It gets routed to a controller. > > The appropriate view gets processed, using the appropriate > templates, etc. > > This is a bit vague and mystical for my taste. Has someone > written up a description of the principal methods that make > all of this work? If so, I''d love to see it! > > -r > --http://www.cfcl.com/rdm Rich Morinhttp://www.cfcl.com/rdm/resume r...-go8te9J4rpwR57kWC/PLzw@public.gmane.org://www.cfcl.com/rdm/weblog +1 650-873-7841 > > Technical editing and writing, programming, and web development--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The first thing that comes to mind is permissions. Have you looked at your return code and system error logs? Try touching something you know you have permissions to access for write. Also: ls -l / | grep tmp and see who the owner is. Rich Morin wrote:> > > It looks like public/dispatch.{cgi,fcgi,rb} are the first > bits of Ruby code that get executed in Rails, depending on > the execution environment. Is this the case? > > If so, why might > > system(''/usr/bin/touch /tmp/t1'') > > in them be failing to act? > > Details: > > This is in a Locomotive environment on Mac OS X. > > % which touch > /usr/bin/touch > > -r > -- > http://www.cfcl.com/rdm Rich Morin > http://www.cfcl.com/rdm/resume rdm-go8te9J4rpw@public.gmane.org > http://www.cfcl.com/rdm/weblog +1 650-873-7841 > > Technical editing and writing, programming, and web development > > > > >-- View this message in context: http://www.nabble.com/-Rails--info-on-high-level-control-flow-of-Rails--tf3130213.html#a8680317 Sent from the RubyOnRails Users mailing list archive at Nabble.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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
At 1:12 PM -0800 1/28/07, s.ross wrote:> The first thing that comes to mind is permissions./tmp (really, /private/tmp on Mac OS X) is mode rwxrwxrwxt (writable by anyone, but sticky). I''m trying to write into a file in it, as a way to check that some code is getting run. Perhaps I should use other tracing options, but this seemed the simplest (and least dependent on Rails, etc.) -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm-go8te9J4rpw@public.gmane.org http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---