简体   繁体   English

Ruby on Rails 3可以在Windows 7上与MySQL一起使用吗?

[英]Can Ruby on Rails 3 work with MySQL on Windows 7?

I try to install Rails 3 on Windows 7, and 我尝试在Windows 7上安装Rails 3,并且

rails new someapp -d mysql
cd someapp
bundle install

will fail at mysql2 将在mysql2失败

so, there is no way to use MySQL but to stick with SQLite3. 因此,除了使用SQLite3之外,没有其他方法可以使用MySQL。 But I tried 但我试过了

rails new app_postgres -d postgresql
cd app_postgres
bundle install

and it all worked. 而且一切正常。

Does that mean perhaps Rails team favor Postgresql slightly more than MySQL? 这是否意味着Rails团队比MySQL更偏爱Postgresql? Is there actually a way to make Rails 3 use the old mysql gems instead so that it can work on Windows or can you somehow make it work, such as by downloading the free Visual Studio and compile mysql2 ourselves? 实际上是否有一种方法可以使Rails 3使用旧的mysql gem代替,以便它可以在Windows上运行,或者可以以某种方式使其运行,例如通过下载免费的Visual Studio并自己编译mysql2?

它的工作现在你可以使用SQLite发展。

You can now install mysql2 gem on windows7 which is working fine with Rails3. 现在,您可以在Windows 7上安装mysql2 gem,它可以与Rails3正常工作。 To install, follow the steps given in post - http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html 要安装,请按照发布-http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html中给出的步骤进行操作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM