Total Ruby N00b here with a question about the Hibbs OnLamp tutorial. I''m trying to hook up to my cookbook database and I''m getting: ActiveRecord::StatementInvalid in Recipe#index Mysql::Error: #42S02Table ''cookbook.recipes'' doesn''t exist: SELECT COUNT(*) FROM recipes RAILS_ROOT: ./script/../config/.. My thoughts: I think I''m not actually connecting to MySQL. My database.yml looks like this for tutorial purposes: development: adapter: mysql database: cookbook username: root password: test: adapter: mysql database: cookbook username: root password: production: adapter: mysql database: cookbook username: root password: I''m running on windoze for testing and development purposes. I''m using SQLFront for database creation and admin. I can log in and see everything and I can see the data source and tables in radrails as well. Just can''t connect. thoughts? Thanks in advance for helping the noobie. I''m excited about rails and ruby and want to get past this hello world stuff into a database app as quickly as possible. Any help is appreciated, Joshua
It connecting to the database alright (you''d get a different message if that was failing). The error message is tell you that the table "cookbook.recipes" does not exist. Double check you spelling of the database ("cookbook") and the table ("recipes"). Curt On 3/22/06, Web Manager <jburke@aea11.k12.ia.us> wrote:> Total Ruby N00b here with a question about the Hibbs OnLamp tutorial. > > I''m trying to hook up to my cookbook database and I''m getting: > > ActiveRecord::StatementInvalid in Recipe#index > Mysql::Error: #42S02Table ''cookbook.recipes'' doesn''t exist: SELECT COUNT(*) > FROM recipes > RAILS_ROOT: ./script/../config/.. > > My thoughts: > I think I''m not actually connecting to MySQL. > > My database.yml looks like this for tutorial purposes: > > development: > adapter: mysql > database: cookbook > username: root > password: > > test: > adapter: mysql > database: cookbook > username: root > password: > > production: > adapter: mysql > database: cookbook > username: root > password: > > I''m running on windoze for testing and development purposes. > > I''m using SQLFront for database creation and admin. > > I can log in and see everything and I can see the data source and tables in > radrails as well. > > Just can''t connect. > > thoughts? > > Thanks in advance for helping the noobie. I''m excited about rails and ruby > and want to get past this hello world stuff into a database app as quickly > as possible. > > Any help is appreciated, > > Joshua > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Told you I was a n00b!. That was it, a typo. Reminds me of when I started trying to do Perl and got my paths wrong... Sheesh. Thank you Mr. Hibbs. Your tutorial on RoR is the best one I''ve come across. I''m looking forward to other stuff from you on RoR. Blessings, - - - Joshua Burke Web Manager Heartland AEA 11 -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org]On Behalf Of Curt Hibbs Sent: Wednesday, March 22, 2006 4:10 PM To: rails@lists.rubyonrails.org Subject: Re: [Rails] n00b question It connecting to the database alright (you''d get a different message if that was failing). The error message is tell you that the table "cookbook.recipes" does not exist. Double check you spelling of the database ("cookbook") and the table ("recipes"). Curt On 3/22/06, Web Manager <jburke@aea11.k12.ia.us> wrote:> Total Ruby N00b here with a question about the Hibbs OnLamp tutorial. > > I''m trying to hook up to my cookbook database and I''m getting: > > ActiveRecord::StatementInvalid in Recipe#index > Mysql::Error: #42S02Table ''cookbook.recipes'' doesn''t exist: SELECTCOUNT(*)> FROM recipes > RAILS_ROOT: ./script/../config/.. > > My thoughts: > I think I''m not actually connecting to MySQL. > > My database.yml looks like this for tutorial purposes: > > development: > adapter: mysql > database: cookbook > username: root > password: > > test: > adapter: mysql > database: cookbook > username: root > password: > > production: > adapter: mysql > database: cookbook > username: root > password: > > I''m running on windoze for testing and development purposes. > > I''m using SQLFront for database creation and admin. > > I can log in and see everything and I can see the data source and tablesin> radrails as well. > > Just can''t connect. > > thoughts? > > Thanks in advance for helping the noobie. I''m excited about rails andruby> and want to get past this hello world stuff into a database app as quickly > as possible. > > Any help is appreciated, > > Joshua > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails