1
votes

I'm running ruby 1.9.2 with rails (3.0.7) on windows 7. Had a hard time setting up mysql gems but eventually found out that will have to go with mysql adapter instead of mysql2 on windows7. database.yml looks like this:

    development:
      adapter: mysql
      encoding: utf8
      database: bfl
      pool: 5
      username: root
      password: 
      socket: /tmp/mysql.sock

"rails dbconsole development" command works fine (although it re-prompts me for password). However, I'm hitting the following through application code:

ActiveRecord::StatementInvalid (Mysql::Error: query: not connected: SELECT bfl_user.* FROM bfl_user)

I found a couple of similar errors for other platforms but not for windows7 and the source of those issues were different.

1

1 Answers

0
votes

I switched from ruby1.9.2 to ruby1.8.7. Followed this tutorial to get mysql2 working: http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html

With 1.9.2, noticed a weird hanging problem with mysql connection.