开发者

Can't get rails working

I can't seem to get rails working. I've been following the tutorial here and it doesn't seem to want to work due to mysql problems or something.. I am curr开发者_开发技巧ently on windows and I also have wamp installed. I installed ruby using railsinstaller from railsinstaller.org. Anyway in the browser I'm getting this error:

Please install the jdbcmysql adapter: `gem install activerecord-jdbcmysql-adapter` (no such file to load -- active_record/connection_adapters/jdbcmysql_adapter)

The trouble is that I continue to install this and then I don't get an error but It just says that active record failed to connect and as soon as I shutdown the server it throws the jdbcmysql error again. Any help is appreciated thanks!


Since you're not using JRuby, there's no reason to be using the JDBC MySQL adapter like you are.

In your config/database.yml file in your Rails application's root directory, find where it says adapter: and change whatever that line to:

adapter: mysql2

For more details on configuration see the Rails Guides. You'll then have to install the mysql2 gem.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜