Hello all. I''m new to Rails and working on replacing an existing Perl based app. Everything has been smooth, and I''m beginning to get the hang of things. I just implemented DB based photo handling, with code directly from the Pragmatic Rails book. Here''s a fresh server log of my app, with a logged in user (by cookie and session) getting a list of his photos. The first 2 requests are fine (/photos/list), then the 3rd one requests scaffold.css (probably just a Safari caching thing?) which I don''t think is part of the issue, but perhaps worth noting for completeness. The fourth request is what makes me nervous, though. It generates 2 warnings: /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/ dependencies.rb:99: warning: already initialized constant ApplicationController /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/ dependencies.rb:99: warning: already initialized constant PhotosController What would cause this? Not specifically, of course, but in a general sense. => Rails application started on http://0.0.0.0:3000 => Ctrl-C to shutdown server; call with --help for options [2005-09-19 11:33:13] INFO WEBrick 1.3.1 [2005-09-19 11:33:13] INFO ruby 1.8.2 (2004-12-25) [powerpc-darwin8.0] [2005-09-19 11:33:14] INFO WEBrick::HTTPServer#start: pid=14690 port=3000 127.0.0.1 - - [19/Sep/2005:11:33:24 EDT] "GET /photos/list HTTP/1.1" 200 1654 - -> /photos/list 127.0.0.1 - - [19/Sep/2005:11:33:25 EDT] "GET /photos/get/3 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/3 127.0.0.1 - - [19/Sep/2005:11:33:25 EDT] "GET /photos/get/2 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/2 127.0.0.1 - - [19/Sep/2005:11:33:25 EDT] "GET /photos/get/1 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/1 127.0.0.1 - - [19/Sep/2005:11:33:30 EDT] "GET /photos/list HTTP/1.1" 200 1654 - -> /photos/list 127.0.0.1 - - [19/Sep/2005:11:33:31 EDT] "GET /photos/get/1 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/1 127.0.0.1 - - [19/Sep/2005:11:33:31 EDT] "GET /photos/get/3 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/3 127.0.0.1 - - [19/Sep/2005:11:33:31 EDT] "GET /photos/get/2 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/2 127.0.0.1 - - [19/Sep/2005:11:33:35 EDT] "GET /photos/list HTTP/1.1" 200 1654 - -> /photos/list 127.0.0.1 - - [19/Sep/2005:11:33:36 EDT] "GET /stylesheets/ scaffold.css HTTP/1.1" 200 1154 http://0.0.0.0:3000/photos/list -> /stylesheets/scaffold.css 127.0.0.1 - - [19/Sep/2005:11:33:36 EDT] "GET /photos/get/3 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/3 127.0.0.1 - - [19/Sep/2005:11:33:36 EDT] "GET /photos/get/1 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/1 127.0.0.1 - - [19/Sep/2005:11:33:36 EDT] "GET /photos/get/2 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/2 127.0.0.1 - - [19/Sep/2005:11:33:53 EDT] "GET /photos/list HTTP/1.1" 200 1654 - -> /photos/list /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/ dependencies.rb:99: warning: already initialized constant ApplicationController /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/ dependencies.rb:99: warning: already initialized constant PhotosController 127.0.0.1 - - [19/Sep/2005:11:33:55 EDT] "GET /stylesheets/ scaffold.css HTTP/1.1" 200 1154 http://0.0.0.0:3000/photos/list -> /stylesheets/scaffold.css 127.0.0.1 - - [19/Sep/2005:11:33:55 EDT] "GET /photos/get/1 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/1 127.0.0.1 - - [19/Sep/2005:11:33:55 EDT] "GET /photos/get/3 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/3 127.0.0.1 - - [19/Sep/2005:11:33:55 EDT] "GET /photos/get/2 HTTP/1.1" 200 35311 http://0.0.0.0:3000/photos/list -> /photos/get/2 -- -- Tom Mornini
On 9/19/05, Tom Mornini <tmornini-W/9V78bTXriB+jHODAdFcQ@public.gmane.org> wrote:> Hello all. > > I''m new to Rails and working on replacing an existing Perl based app. > > Everything has been smooth, and I''m beginning to get the hang of things. > > I just implemented DB based photo handling, with code directly from the > Pragmatic Rails book. > > Here''s a fresh server log of my app, with a logged in user (by cookie > and session) getting a list of his photos. The first 2 requests are > fine (/photos/list), then the 3rd one requests scaffold.css (probably > just a Safari caching thing?) which I don''t think is part of the issue, > but perhaps worth noting for completeness. > > The fourth request is what makes me nervous, though. It generates 2 > warnings: > > /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/ > dependencies.rb:99: warning: already initialized constant > ApplicationController > /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/ > dependencies.rb:99: warning: already initialized constant > PhotosController > > What would cause this? Not specifically, of course, but in a general > sense.This is an indication that your app is being reloaded on each hit. This is normal if you''re running in development, and will not happen in production. -- rick http://techno-weenie.net
On Sep 19, 2005, at 3:37 PM, Rick Olson wrote:> On 9/19/05, Tom Mornini <tmornini-W/9V78bTXriB+jHODAdFcQ@public.gmane.org> wrote: > >> >> The fourth request is what makes me nervous, though. It generates 2 >> warnings: >> >> /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/ >> dependencies.rb:99: warning: already initialized constant >> ApplicationController >> /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/ >> dependencies.rb:99: warning: already initialized constant >> PhotosController >> > > This is an indication that your app is being reloaded on each hit. > This is normal if you''re running in development, and will not happen > in production. >Thank you. -- -- Tom Mornini