I''m new to Rails and managed to install it on Mac OS X Tiger by following http://www.tonyarnold.com/articles/2005/08/10/rolling-with-ruby-on-rails-on-mac-os-x-tiger-for-beginners . I''m following a tutorial in the book Agile Web Development with Rails by Dave Thomas and David Heinemeier Hansson. In chapter 6 the tutorial says to execute: ruby script/generate scaffold Product Admin Upon running this I get: ---- dependency model exists app/models/ exists test/unit/ exists test/fixtures/ skip app/models/product.rb skip test/unit/product_test.rb skip test/fixtures/products.yml exists app/controllers/ exists app/helpers/ exists app/views/admin exists test/functional/ overwrite app/controllers/admin_controller.rb? [Ynaq] Ya forcing scaffold force app/controllers/admin_controller.rb force test/functional/admin_controller_test.rb force app/helpers/admin_helper.rb force app/views/layouts/admin.rhtml force public/stylesheets/scaffold.css force app/views/admin/list.rhtml force app/views/admin/show.rhtml force app/views/admin/new.rhtml force app/views/admin/edit.rhtml WARNING: You have a nil object when you probably didn''t expect it! Odds are you want an instance of Array instead. Look in the callstack to see where you''re working with an object that could be nil. Investigate your methods and make sure the object is what you expect! ---- Does anyone know why this happens and how to fix it? Does anyone know how to review the callstack? Thanks -Eric _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
This means that Rails cannot access your database to find out about Product. Either you haven''t configured rails correctly to access the database or you haven''t loaded the database table. Matthew On 9/27/05, Eric Fazendin <im.combustible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m new to Rails and managed to install it on Mac OS X Tiger by following > http://www.tonyarnold.com/articles/2005/08/10/rolling-with-ruby-on-rails-on-mac-os-x-tiger-for-beginners. > > I''m following a tutorial in the book Agile Web Development with Rails by > Dave Thomas and David Heinemeier Hansson. In chapter 6 the tutorial says to > execute: > > ruby script/generate scaffold Product Admin > > Upon running this I get: > > ---- > dependency model > exists app/models/ > exists test/unit/ > exists test/fixtures/ > skip app/models/product.rb > skip test/unit/product_test.rb > skip test/fixtures/products.yml > exists app/controllers/ > exists app/helpers/ > exists app/views/admin > exists test/functional/ > overwrite app/controllers/admin_controller.rb? [Ynaq] Ya > forcing scaffold > force app/controllers/admin_controller.rb > force test/functional/admin_controller_test.rb > force app/helpers/admin_helper.rb > force app/views/layouts/admin.rhtml > force public/stylesheets/scaffold.css > force app/views/admin/list.rhtml > force app/views/admin/show.rhtml > force app/views/admin/new.rhtml > force app/views/admin/edit.rhtml > WARNING: You have a nil object when you probably didn''t expect it! Odds > are you > want an instance of Array instead. > > Look in the callstack to see where you''re working with an object that > could be nil. > Investigate your methods and make sure the object is what you expect! > ---- > > Does anyone know why this happens and how to fix it? Does anyone know how > to review the callstack? > > Thanks > -Eric > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Actually I found the solution to this problem at: http://www.tonyarnold.com/articles/2005/08/11/mysql-bindings-for-ruby-under-mac-os-x-tiger On 9/26/05, matthew newhook <matthew.newhook-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > This means that Rails cannot access your database to find out about > Product. Either you haven''t configured rails correctly to access the > database or you haven''t loaded the database table. > > Matthew > > On 9/27/05, Eric Fazendin <im.combustible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''m new to Rails and managed to install it on Mac OS X Tiger by > > following http://www.tonyarnold.com/articles/2005/08/10/rolling-with-ruby-on-rails-on-mac-os-x-tiger-for-beginners > > . > > > > I''m following a tutorial in the book Agile Web Development with Rails by > > Dave Thomas and David Heinemeier Hansson. In chapter 6 the tutorial says to > > execute: > > > > ruby script/generate scaffold Product Admin > > > > Upon running this I get: > > > > ---- > > dependency model > > exists app/models/ > > exists test/unit/ > > exists test/fixtures/ > > skip app/models/product.rb > > skip test/unit/product_test.rb > > skip test/fixtures/products.yml > > exists app/controllers/ > > exists app/helpers/ > > exists app/views/admin > > exists test/functional/ > > overwrite app/controllers/admin_controller.rb? [Ynaq] Ya > > forcing scaffold > > force app/controllers/admin_controller.rb > > force test/functional/admin_controller_test.rb > > force app/helpers/admin_helper.rb > > force app/views/layouts/admin.rhtml > > force public/stylesheets/scaffold.css > > force app/views/admin/list.rhtml > > force app/views/admin/show.rhtml > > force app/views/admin/new.rhtml > > force app/views/admin/edit.rhtml > > WARNING: You have a nil object when you probably didn''t expect it! Odds > > are you > > want an instance of Array instead. > > > > Look in the callstack to see where you''re working with an object that > > could be nil. > > Investigate your methods and make sure the object is what you expect! > > ---- > > > > Does anyone know why this happens and how to fix it? Does anyone know > > how to review the callstack? > > > > Thanks > > -Eric > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails