rails new app =>
当前的database.yml就像是=>
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000 …Run Code Online (Sandbox Code Playgroud) 获得:
An error has occurred:
Error connecting to the server: fe_sendauth: no password supplied
Run Code Online (Sandbox Code Playgroud)
设置database.yml与其他计算机上的应用程序设置相同.
如何设置以便我不需要硬编码的密码?
我可以使用PgAdmin-III查看db ok.
我宁愿没有密码,database.yml因为使用这个应用程序的其他机器没有/需要它,所以它似乎可能与我的Pg安装有关.