From: Curt Hibbs Date: 2005-10-26T22:44:25+09:00 Subject: Re: help: trouble with ONLamp's cookbook tutorial / mysql ------=_Part_2969_21431517.1130334263040 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 10/26/05, lewcio@gmail.com wrote: > > I haven't yet touched the tutorial app's code except to change the > database.yml to read: > development: > adapter: mysql > database: cookbook > host: localhost > ... > > Application starts up fine at http://127.0.0.1:3000 > > When I try to test http://127.0.0.1:3000/recipe/list I get the > following error: > ActiveRecord::StatementInvalid in Recipe#list > Invalid argument: SELECT * FROM recipes > > Yet I'm able to query SELECT * FROM recipes in Eclipse's "Instant SQL" > tool and get the correct results. > > What could be the problem? I have read somewhere that it could be that > the ruby mysql driver is outdated. Unfortunately I wasn't able to find > one to install. Any ideas? > > running on Win XP: > Eclipse 3.1.1, app launched with WEBrick > Instant Rails 1.0 preview 1 > Ruby 1.8.2 > MySQL 4.1.9 I'm not sure what's going on here. You could try running Instant Rails ( http://instantrails.rubyforge.org/) which comes with the cookbook app installed as a sample app and see if it works on your machine. If you decide to try this, you'll have to stop you currently installation o= f MySQL before starting Instant Rails since it tries to start its own copy of MySQL. Also, if you decide to try this, try it first using WEBrick instead of the built-in Apache web server like this: From the main menu (click on the "I" button) select: Rails Applications >> Manage Rails Applications... then check the checkbox next to the "cookbook" application and click the button "Start with WEBrick" Curt ------=_Part_2969_21431517.1130334263040--