user818700
user818700

Reputation:

Rails project using MySQL gem not starting up on Windows 8

My specs are as follow:

I installed rails via the RailsInstaller. I have also installed the mysql2 gem. I created a new project that is pre-configured to use mysql e.g.

rails new project_name -d mysql

I then tried to start up the server/WEBrick via

rails server

And I get the following error:

enter image description here

I've tried this using the mysql2 as well as teh mysql gem. Both times I get the same error. When I use the default sqlite then the project starts up fine and I can view it on localhost:3000.

I'm aware that mysql2 used to be a problem on rails, but since mysql isn't working either I'm of the opinion that it's a Windows 8 specific project, surprise surprise.

I'd deff like to use MySQL rather than SQLite. Thanks for anyone that can point me in the right direction!

Upvotes: 0

Views: 299

Answers (2)

ѕтƒ
ѕтƒ

Reputation: 3647

Please update your MySQL to 64bit version. It will fix the problem. Don't forgot to install the Devkit.

Upvotes: 0

sjain
sjain

Reputation: 23354

As a noted error case,

The SO Post says-

"The problem is with mysql. It is a 64 bit installation. Change it to 32bit and it runs fine."

Apart from that, this error may also be the result of some missing gems. You should try running bundle install before running your server.

Also make sure that gem mysql is added to your gemfile before you do bundle install.

Upvotes: 1

Related Questions