简体   繁体   English

人们在Rails生产机器上使用什么数据库?

[英]What database are people using on Rails production machines?

I'm trying to get started in the Rails word here after the 3.0 upgrade, and it seems mysql support has been stripped out in favor of sqlite. 我试图在3.0升级之后开始使用Rails这个词,似乎mysql的支持已被剥离,转而支持sqlite。 After spending hours trying to install the mysql2 gem and failing I'm going to try and develop in sqlite, but are people really using that for production? 花了好几个小时试图安装mysql2 gem并且失败了我将尝试在sqlite中开发,但人们是否真的使用它进行生产?

I'm just about ready to give up and do this project in PHP, but I really want to give rails a shot. 我只是准备放弃并在PHP中完成这个项目,但我真的想给rails做一个镜头。 Any help or advice is appreciated. 任何帮助或建议表示赞赏。

MySQL is still very common. MySQL仍然常见。 The mysql2 gem is in vogue and should not be terribly difficult to install. mysql2 gem很流行,不应该非常难以安装。 Perhaps open a new question with your installation problems. 或许可以针对您的安装问题打开一个新问题。

If you are interested in alternatives to MySQL, ask on programmers . 如果您对MySQL的替代品感兴趣,请询问程序员

Except in certain narrow circumstances, don't plan on using SQLite in production. 除了在某些狭窄的情况下,不要计划在生产中使用SQLite。 See https://stackoverflow.com/questions/3630/sqlite-vs-mysql for more discussion. 有关更多讨论,请参阅https://stackoverflow.com/questions/3630/sqlite-vs-mysql

In production people use different ones based on the requirements and hosting servers. 在生产中,人们根据需求和托管服务器使用不同的。

I use heroku.com to host my proudction applications and heroku uses postgres by default. 我使用heroku.com来托管我的自豪应用程序,heroku默认使用postgres。

But I guess more developers still use MySql in production because of its ease of use and non strict sql grammer implementation. 但我想更多开发人员仍然在生产中使用MySql,因为它易于使用和非严格的sql语法实现。

I have even seen really big applications that are run using oracle. 我甚至看到过使用oracle运行的大型应用程序。

There are few developers who use sqlite in production also esp if they have very low traffic. 很少有开发人员在生产中使用sqlite,尤其是如果他们的流量非常低。

Go with sqllite for development and once you are dene with development and if you follow the rails convention like db:seed and migrations it will be pretty easy to move to any database as you want when the application is ready for production. 使用sqllite进行开发,一旦开发了denene,如果你遵循db:seed和migrations之类的rails约定,那么当应用程序准备好生产时,可以很容易地移动到任何数据库。

No. Sqlite3 is good for development and for standalone apps. 不,Sqlite3适合开发和独立应用。

For web development most popular databases are: MySQL , PostgreSQL . 对于Web开发,最流行的数据库是: MySQLPostgreSQL Also there is some nosql databases such as MongoDB and CouchDB 还有一些nosql数据库,如MongoDBCouchDB

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

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