如何在Rails中设置database.yml文件? [英] How do I set up the database.yml file in Rails?

查看:260
本文介绍了如何在Rails中设置database.yml文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在做这个教程(http://dmix.ca/2008/09/how-to-scrape-websites-in-ruby-on-rails-using-scrubyt/),我开始之前的第4步是设置database.yml文件。不知道这是什么意思。

I'm doing this tutorial (http://dmix.ca/2008/09/how-to-scrape-websites-in-ruby-on-rails-using-scrubyt/) and step 4 before I begin is to set up the database.yml file. Not sure what that means. Could someone please explain?

推荐答案

首先,我将使用 http://ruby.railstutorial.org/

并且database.yml是您放置应用程序使用的数据库的设置 - 用户名,密码,主机 - 每个数据库。有了新的应用程序,你不需要改变任何东西 - 只需使用默认的sqlite设置。

And database.yml is place where you put setup for database your application use - username, password, host - for each database. With new application you dont need to change anything - simply use default sqlite setup.

这篇关于如何在Rails中设置database.yml文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆