snag with 1.6 installation+discussion
IANAC, but I sounds like it may be a known bug that we're working on a patch for. --John Abbe
Hi Mike,
This is patched in the latest code on github, but we haven't added new quick install files yet. I hope to get those out very soon, but if you'd like to do it yourself, just comment out line 146 of config/wagn_initializer.rb, which reads:
::Cardtype.load_cache unless ['test','cucumber'].member? ENV['RAILS_ENV']
To comment it out, just add a "#" at the beginning of the line and save it. (Or you could just delete the line altogether)
Sorry for the bug!
--Ethan McCutchen.....Wed Jun 01 22:59:53 -0700 2011
Thanks! That fixed the error. Unfortunately ...
rake wagn:create
now produces a different error, also database related:
Couldn't drop : #<ActiveRecord::StatementInvalid: Mysql::Error: Incorrect database name '': DROP DATABASE IF EXISTS ``>
already exists
-- create_table("card_files", {:force=>true})
rake aborted!
Mysql::Error: No database selected: SHOW TABLES
--Mike Gallagher.....Thu Jun 02 08:04:08 -0700 2011
It looks like it doesn't know what database name to use, which probably means something is wrong in your config/database.yml file.
Are you doing the "quick start" or the "long haul" installation method? If you're using the long haul method, you may have skipped the step of copying over that file?
Could you post that file here (minus any passwords or private info)?
--Ethan McCutchen.....Thu Jun 02 08:35:06 -0700 2011
btw, I may soon change the name of this ticket to something that will make this info easier for others to find.
--Ethan McCutchen.....Thu Jun 02 09:06:37 -0700 2011
Yes, I thought that might be the case. I altered the database.yml as per the long haul instructions. After doing so, I get a similar, but slightly different error.
- - - - - - - - - - - - - - - - - -
database.yml
- - -
common: &common
adapter: mysql
username: wagn
password: ---
host: localhost
secret: YrDOFOmYJyFg2tTZykCbZjWYQUbKBt
development:
adapter: mysql
socket: /var/mysql/mysql.sock
database: wagn_development
username: wagn
password: ---
host: localhost
test:
adapter: mysql
socket: /var/mysql/mysql.sock
database: wagn_test
username: wagn
password: ---
host: localhost
cucumber:
database: wagn_test
session_key: wagn_test
<<: *common
production:
adapter: mysql
socket: /var/mysql/mysql.sock
database: wagn_production
username: wagn
password: ---
host: localhost
- - - - - - - - - - - - - - - - - -
and now the error message
- - -
Couldn't drop wagn_development : #
Couldn't create database for {"adapter"=>"mysql", "socket"=>"/var/mysql/mysql.sock", "database"=>"wagn_development", "username"=>"wagn", "password"=>"thepasswordwasrighthere", "host"=>"localhost"}, charset: utf8, collation: utf8_unicode_ci (if you set the charset manually, make sure you have a matching collation)
-- create_table("card_files", {:force=>true})
rake aborted!
Mysql::Error: No database selected: SHOW TABLES
(btw, yes, sorry about the name, that was duh moment on my part)
--Mike Gallagher.....Thu Jun 02 09:15:33 -0700 2011
Hmm, looks like a mysql issue. I would try logging into mysql with that username and password and running "create database wagn_development" and seeing if you get that same error.
Judging by this, that charset/collation message may not be relevant to the problem. Someone on that post had the issue because the mysql user had not been created yet.
--Ethan McCutchen.....Thu Jun 02 10:58:33 -0700 2011