This forum is no longer active. Please post your questions to our new community site
RubyStack & MySQL does not work
|
|
I did a fresh installation of rubystack with the sample project. Sample project uses MySQL as a default as its database. I tried to run a quick test to the sample project (create simple scaffold) just to test rails. While migrating database, rails prints this error: RuntimeError (!!! Missing the mysql2 gem. Add it to your Gemfile: gem ‘mysql2’): database.yml says the adapter is mysql. If I change it to mysql2, error is “can’t convert Fixnum into String”. Sometimes rails tells me to install activerecord-mysql-adapter. OS is Mac OS X 10.6.6, Rubystack is 2.1.1. Any ideas? I can setup SQLite, but I would like to test rails with MySQL. |
|
|
Hi, Are you running the command from the “rubyconsole” ? This is to use the Stack binaries instead of your system versions.
|
|
|
Hi, Yes, I am running commands in rubyconsole. |
|
|
Another test. I made new example with
Generated config/database.yml says that I should install mysql (gem install mysql2). If I run that command in rubyconsole, it gives this error:
Test continues. I edited database.yml file right (added socket: /Applications…../ etc) and changed the right info for the database. Now the error is
|
|
|
Problem solved. I had test password which was all numbers. Rake couldn’t understand this.
:) |
|
|
Glad to hear you fixed the problem :) |

