방금 레일스를 연구하기 시작했습니다. "rake db : migrate"를 시도하면 다음 오류가 발생합니다.rake db : migrate failed
레이크 중단되었습니다! FATAL : 피어 인증은 database.yml을에 문제가있는 것 같다하지만 난 어떻게 해결하는 방법 아무 생각이 사용자 "KT1"
실패했습니다. 제게 조언 해주세요.
의견을 보내 주셔서 감사합니다. PostgreSQL (0.13.2)을 사용하고 있습니다. 내 환경은 다음과 같습니다. 아래 우분투 11.10 루비 1.8.7 레일 3.2.3 보석 1.8.21
database.yml을.
나는 또한 빈의 이름으로 시도# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
# gem install pg
# On Mac OS X with macports:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
# gem install pg
# Choose the win32 build.
# Install PostgreSQL and put its /bin directory on your path.
#
# Configure Using Gemfile
# gem 'pg'
#
development:
adapter: postgresql
encoding: unicode
database: kt1_development
pool: 5
username: kt1
password:
# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
# domain sockets, so uncomment these lines.
#host: localhost
#port: 5432
# Schema search path. The server defaults to $user,public
#schema_search_path: myapp,sharedapp,public
# Minimum log levels, in increasing order:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error, fatal, and panic
# The server defaults to notice.
#min_messages: warning
# 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: postgresql
encoding: unicode
database: kt1_test
pool: 5
username: kt1
password:
production:
adapter: postgresql
encoding: unicode
database: kt1_production
pool: 5
username: kt1
password:
. 그런 다음 오류가
rake aborted!
FATAL: role "kenji" does not exist
에 관해서 (켄지는 우분투 사용자 이름입니다.) 당신의 database.yml을 파일에서
'database.yml'을 게시 할 수 있습니까? 중요한 데이터를 차단합니다. 어떤 데이터베이스 유형 (MySQL, PostgreSQL 등)을 사용하려고합니까? – Alex