0

My specs are as follow:

  • Windows 8 64-bit
  • Ruby 1.9.3
  • Rails 3.2.12

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!

4

2 回答 2

2

作为一个指出的错误案例,

SO Post说-

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

除此之外,这个错误也可能是一些缺少宝石的结果。您应该bundle install在运行服务器之前尝试运行。

还要确保gem mysql在执行之前将其添加到您的 gemfile 中bundle install

于 2013-03-11T08:08:24.770 回答
0

请将您的 MySQL 更新为 64 位版本。它将解决问题。别忘了安装Devkit.

于 2013-03-11T08:23:29.983 回答