开发者

MySQL error when running `rails server`

I get the following error when I run rails server

Could not find mysql2开发者_JAVA技巧-0.2.7 in any of the sources

Any ideas? How do i fix this?

Thanks in advance ;-)


If for some reason you have the version number specified next to the gem, try removing it, just do

gem 'mysql2' in your Gemfile,

Then run "bundle install", that should do it


You need to go read up on Bundler: http://gembundler.com/

Bundler is included in Rails 3 by default. At the root of your app is a file called

Gemfile

You should only use mysql or mysql2. I recommend mysql2 so if you have more than one in your Gemfile then remove the others. Then make sure you run bundle install.

For complete instructions on setting up MySQL and Rails on OSX, check out this blog post:

Preferred Rails 3 and MySQL Installation on OSX Snow Leopard

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜