2012-06-15 5 views
1

안녕하세요, 저는 activerecord와 postgresql을 사용하여 herokus cedar 스택에 캠핑 앱을 배포하는 방법을 궁금합니다.heroku에 캠핑 앱을 배포 하시겠습니까?

내 database.yml을 :

production: 
    adapter: postgresql 
    host: localhost 
    database: mydb 

은 지금은 내가 같은 파일에서 개발 데이터베이스 설정을 할 데이터베이스에 연결하는 데 문제가 있어요.

UPDATE : 존스에 따라 오류 로그 Heroku가 저를주고 여기에 대답에서 ,

2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:329:in `initialize' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:319:in `checkout_new_connection' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:1206:in `connect' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:233:in `checkout' 
2012-06-15T20:00:24+00:00 app[web.1]: /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:1206:in `initialize': could not connect to server: Connection refused (PG::Error) 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection' 
2012-06-15T20:00:24+00:00 app[web.1]: from /usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in `loop' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:236:in `block in checkout' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/config.ru:12:in `block in <main>' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/config.ru:1:in `<main>' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/src/nuts.rb:8:in `create' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:137:in `start' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app' 
2012-06-15T20:00:24+00:00 app[web.1]: Is the server running on host "localhost" and accepting 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:1206:in `new' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:309:in `new_connection' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/config.ru:1:in `new' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:241:in `block (2 levels) in checkout' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in `app' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/model_schema.rb:223:in `table_exists?' 
2012-06-15T20:00:24+00:00 app[web.1]: from (eval):20:in `create_schema' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/rackup:19:in `<main>' 
2012-06-15T20:00:24+00:00 app[web.1]: TCP/IP connections on port 5432? 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:404:in `retrieve_connection' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:96:in `block in connection' 
2012-06-15T20:00:24+00:00 app[web.1]: from /usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in `start' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/bin/rackup:19:in `load' 
2012-06-15T20:00:24+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/bin/rackup:4:in `<top (required)>' 
일반적으로 Heroku가이 DATABASE_URL 환경 변수에 연결된 자신과 당신의 database.yml을 대체됩니다

답변

1

(A 응용 프로그램을 설치할 때 프로비저닝되는 postgres 데이터베이스)에 응용 프로그램을 배포합니다.

무슨 문제가 있습니까?

관련 문제