3
我試着推新應用的Heroku和走這條錯誤PG::ConnectionBad: could not connect to server: Connection refused
的Heroku:PG :: ConnectionBad:無法連接到服務器:連接被拒絕
這是我的Gemfile,它有與該怎麼辦?我正在使用瘋狂與Postgress。我不確定,因爲這是我第一次嘗試在heroku中使用狂歡,但它似乎沒有經過。任何幫助,將不勝感激
source 'https://rubygems.org'
ruby "2.2.1"
gem 'puma', '~> 2.13.4'
gem 'braintree', '~> 2.48.1'
gem 'rails', '4.2.3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
end
group :production, :staging do
gem 'pg'
gem 'rails_12factor', '~> 0.0.3'
end
gem 'spree', '3.0.4'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '3-0-stable'
的database.yml
default: &default
adapter: postgresql
encoding: unicode
pool: 5
development:
<<: *default
host: localhost
database: ****
username: ****
password: ****
test:
<<: *default
host: localhost
database: ****
username: ****
password: ****
production:
<<: *default
database: ****
username: ****
password: <%= ENV['DATABASE_PASSWORD'] %>
可悲的是,我已經有上傳到heroku – JamesRocky
你可以試試這個嗎? 'heroku插件:創建heroku-postgresql' –
完成,它表示數據庫是空的,但創建 – JamesRocky