Hi, I have my sqlite db set up. In it is a table called people. I created the model Person And then created the controller Person (as in the ONLamp.com site). I added that the controller is scaffolding the Person model. When I try to look at localhost/person/new or localhost/person/list it gives me a NameError in Person#new uninitialized constant API RAILS_ROOT: . Application Trace <http://localhost:15000/person/new> | Framework Trace <http://localhost:15000/person/new> | Full Trace <http://localhost:15000/person/new> Have I forgotten to configure something else? I''m running Rails 0.14.2 Thanks. Cary FitzHugh _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Just a wild guess, but look at the format of the column names in people. Is any one of them a Ruby keyword or the same as your project name? JB ----- Original Message ----- From: Fitzhugh, Cary To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Sent: Wednesday, November 02, 2005 11:33 AM Subject: [Rails] Beginner Question Hi, I have my sqlite db set up. In it is a table called people. I created the model Person And then created the controller Person (as in the ONLamp.com site). I added that the controller is scaffolding the Person model. When I try to look at localhost/person/new or localhost/person/list it gives me a NameError in Person#new uninitialized constant APIRAILS_ROOT: . Application Trace | Framework Trace | Full Trace Have I forgotten to configure something else? I''m running Rails 0.14.2 Thanks. Cary FitzHugh ------------------------------------------------------------------------------ _______________________________________________ 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
Sorry, nope... the fields are: Id firstName lastName Shoot. Even when I follow the directions for the cookbook it won''t work. Cary ________________________________ From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of speechexpert Sent: Wednesday, November 02, 2005 2:56 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Beginner Question Just a wild guess, but look at the format of the column names in people. Is any one of them a Ruby keyword or the same as your project name? JB ----- Original Message ----- From: Fitzhugh, Cary <mailto:Cary.Fitzhugh-8RzCm++CEw3QT0dZR+AlfA@public.gmane.org> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Sent: Wednesday, November 02, 2005 11:33 AM Subject: [Rails] Beginner Question Hi, I have my sqlite db set up. In it is a table called people. I created the model Person And then created the controller Person (as in the ONLamp.com site). I added that the controller is scaffolding the Person model. When I try to look at localhost/person/new or localhost/person/list it gives me a NameError in Person#new uninitialized constant API RAILS_ROOT: . Application Trace <http://localhost:15000/person/new> | Framework Trace <http://localhost:15000/person/new> | Full Trace <http://localhost:15000/person/new> Have I forgotten to configure something else? I''m running Rails 0.14.2 Thanks. Cary FitzHugh ________________________________ _______________________________________________ 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
Fitzhugh, Cary <Cary.Fitzhugh@...> writes:> When I try to look at localhost/person/new or > localhost/person/list it gives me a > > NameError > in Person#new > > uninitialized constant API > > RAILS_ROOT: > . > > Application Trace | Framework Trace | Full Trace >I ran into a somewhat similar similar problem. I had an app that was working on my OS X box, but when I set up a fresh install of Ruby and Rails on my Solaris server I got an error. Here''s my setup: dean@apogee:~/ontour > ruby -v ruby 1.8.3 (2005-09-21) [sparc-solaris2.9] dean@apogee:~/ontour > gem -v 0.8.11 dean@apogee:~/ontour > rails -v Rails 0.14.2 MySQL 4.1.8 Ruby and Rubygems were built from the stable tarballs and Rails was installed via: gem install --include-dependecies rails And the error message again: ActiveRecord::StatementInvalid in Article_admin#index Lost connection to MySQL server during query: SELECT COUNT(*) FROM articles RAILS_ROOT: . I''m able to run the query from the mysql client (with the same username, password and domain socket that are in database.yml) with no problem. Any help would be greatly appreciated. thanks! dean.