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

发布于 2024-09-24 10:57:52 字数 451 浏览 0 评论 0原文

我尝试在 Windows 7 上安装 Rails 3,但

rails new someapp -d mysql
cd someapp
bundle install

在 mysql2 上安装失败

,因此没有办法使用 MySQL,只能坚持使用 SQLite3。但我尝试过

rails new app_postgres -d postgresql
cd app_postgres
bundle install

,一切都成功了。

这是否意味着 Rails 团队可能比 MySQL 更喜欢 Postgresql?实际上有没有一种方法可以让 Rails 3 使用旧的 mysql gems,以便它可以在 Windows 上工作,或者您可以以某种方式使其工作,例如通过下载免费的 Visual Studio 并自己编译 mysql2?

I try to install Rails 3 on Windows 7, and

rails new someapp -d mysql
cd someapp
bundle install

will fail at mysql2

so, there is no way to use MySQL but to stick with SQLite3. 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? 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情深如许 2024-10-01 10:57:52

正在研究
现在您可以使用sqlite进行开发。

Working on it
For now you can use sqlite for development.

盗心人 2024-10-01 10:57:52

您现在可以在 windows7 上安装 mysql2 gem,它可以与 Rails3 正常工作。
要安装,请按照帖子中给出的步骤 - http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html

You can now install mysql2 gem on windows7 which is working fine with Rails3.
To install, follow the steps given in post - http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文