相关疑难解决方法(0)

Ruby on Rails:我如何为postgresql编辑database.yml?

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)

ruby database postgresql ruby-on-rails ruby-on-rails-3

45
推荐指数
4
解决办法
6万
查看次数

试图为ror app设置postgres,收到错误 - fe_sendauth:没有提供密码

获得:

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安装有关.

ruby passwords postgresql ruby-on-rails pg

26
推荐指数
2
解决办法
6万
查看次数