2013-07-24 4 views
1

레일 3.2 ruby ​​1.9.3 앱을 디지털 바다에 배치하려고합니다. 을 수행 한 후 cap deploy:setup, cap deploy:check, cap deploy, 나는 다음과 같은 오류가 발생합니다 :postgresql 어댑터를 설치하십시오 :`gem install activerecord-postgresql-adapter`

$ gem install activerecord-postgresql-adapter 
    * ←[33mexecuting "cd -- /home/deployer/apps/csd3/releases/20130724142600 && RA 
ILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile"←[0m 
    servers: ["192.241.141.56"] 
    [192.241.141.56] executing command 
** [out :: 192.241.141.56] rake aborted! 
** [out :: 192.241.141.56] Please install the postgresql adapter: `gem install 
activerecord-postgresql-adapter` (pg is not part of the bundle. Add it to Gemfil 
e.) 

내가 서버에 액티브 - PostgreSQL의 어댑터를 설치 보석을 실행하고 완료합니다. 그러나 배포 할 때 동일한 메시지가 나타납니다. 그 문제는 database.yml 파일에있을 수 있지만 괜찮아 보인다.

development: 
    adapter: sqlite3 
    database: db/development.sqlite3 
    pool: 5 
    timeout: 5000 

test: 
    adapter: sqlite3 
    database: db/test.sqlite3 
    pool: 5 
    timeout: 5000 

production: 
    adapter: postgresql 
    encoding: unicode 
    database: chodae_database 
    host: 192.241.141.56 
    pool: 5 
    username: chodae 
    password: 

그리고 Gemfile :

group :development do 
    gem 'quiet_assets', '1.0.2' 
    gem 'sqlite3', '1.3.7' 
    gem 'thin', '1.5.0' 
    gem 'better_errors', '0.7.0' 
    gem 'binding_of_caller', '0.7.1' 
    gem 'meta_request', '0.2.2' 
    gem 'wirble', '0.1.3' 
    gem 'hirb', '0.7.1' 
    gem 'populator3', '0.2.7' 
    gem 'faker', '1.1.2' 
    gem 'localtunnel' 
    gem 'capistrano' 
end 

group :production do 
    gem 'pg', '0.15.1' 
    gem 'pg_search', '0.6.2' 
    gem "nginx", '0.0.2' 
    gem "passenger", "~> 4.0.10" 
end 

어떻게이 문제를 해결할 수 있습니까?

+0

을 실행할 때 양조 postgresql'를 설치'일을하려고 했

문제는 자산 그룹의 페이지 보석의없는 것 같다? 내가 – irosenb

+0

이 저를 실행할 때 – user2612027

답변

2

우선 모든 환경에서 동일한 DB를 사용하는 것이 가장 좋습니다.
RAILS_ENV=production bundle exec gem install pg을 서버에서 실행 하시겠습니까?

RAILS_ENV=production RAILS_GROUPS=assets bundle exec rake assets:precompile 
+0

RAILS_ENV = 생산 번들 간부 보석이 페이지 설치 환경을 개발 창에서 실행하고 – user2612027

+0

문제는 자산 그룹의 페이지 보석의 없을 것으로 보인다 서버에 Gemfile 를 찾을 수 없습니다 제공 당신을 무엇 그게 무슨 뜻이야? – user2612027

+0

'RAILS_GROUPS = assets'을 볼 수있는 아래 문자열을 제공했습니다. –

관련 문제