Fixed: Commands out of sync

Aptana RadRails discussion.

Moderator: Aptana Staff

Fixed: Commands out of sync

Postby agm_ultimatex » Sun Feb 22, 2009 12:09 am

Hello. Im trying to the Getting Rolling with Ruby on Rails tutorial, and I am running into some trouble. I am running a mysql database via WAMP server at 3306. I followed the instructions, and ran a db:create to create the 3 databases. I currently only see the first database: cookbook_dev. When I tried a db:createall:all, I saw this output in the console:

** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
** Rails loaded.

** Loading any Rails specific GemPlugins
** Signals ready. INT => stop (no restart).
** Mongrel 1.1.5 available at 0.0.0.0:3000
** Use CTRL-C to stop.
"2644"
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.2.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
rake db:migrate
SQL (0.0ms) SET NAMES 'utf8'
SQL (0.0ms) SET SQL_AUTO_IS_NULL=0
SQL (0.0ms) SHOW TABLES
SQL (0.0ms) SELECT version FROM schema_migrations
Migrating to CreateReciples (20090221234401)
SQL (0.0ms) SHOW TABLES
SQL (0.0ms) Mysql::Error: Commands out of sync; you can't run this command now: SHOW TABLES
S
SQL (16.0ms) SET NAMES 'utf8'
SQL (0.0ms) SET SQL_AUTO_IS_NULL=0
SQL (0.0ms) CREATE DATABASE `cookbook_dev` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_general_ci`
0m
SQL (0.0ms) SET NAMES 'utf8'
SQL (0.0ms) SET SQL_AUTO_IS_NULL=0
SQL (0.0ms) SET NAMES 'utf8'
SQL (0.0ms) SET SQL_AUTO_IS_NULL=0
SQL (0.0ms) CREATE DATABASE `cookbook` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_general_ci`
SQL (0.0ms) SET NAMES 'utf8'
SQL (0.0ms) SET SQL_AUTO_IS_NULL=0
SQL (0.0ms) CREATE DATABASE `cookbook_test` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_general_ci`
Last edited by agm_ultimatex on Sun Feb 22, 2009 6:49 pm, edited 1 time in total.
agm_ultimatex
 
Posts: 93
Joined: Thu Aug 21, 2008 4:13 am
Location: Canada

Re: Trouble creating db's & tables

Postby agm_ultimatex » Sun Feb 22, 2009 4:27 am

I was just messing around with the single install of ruby and rails, instructed from rubyonrails.org. I realized the db's and tables do seem to be there, however an error is coming up (i saw a similar one in radrails as well) when trying to do a db:migrate.

Commands out of sync; you can't run this command now: SHOW_TABLES
agm_ultimatex
 
Posts: 93
Joined: Thu Aug 21, 2008 4:13 am
Location: Canada

Re: Trouble creating db's & tables

Postby agm_ultimatex » Sun Feb 22, 2009 6:49 pm

Well i fixed my own error again. It would seem it has trouble working with a certain dll of mysql. From a suggestion i found off another forum, I copied the dll from php into C:\Ruby\bin. The dll is: libmysql.dll, which I grabbed from my wamp install at: C:\wamp\bin\php\php5.2.6
agm_ultimatex
 
Posts: 93
Joined: Thu Aug 21, 2008 4:13 am
Location: Canada


Return to Aptana RadRails