Я создаю приложение вирусных целевых страниц с использованием открытого кода с открытым текстом Harry's Shave.Не удается настроить файл Database.yml.
https://github.com/wardpenney/prelaunchr/tree/master
Я изо всех сил, чтобы подтолкнуть приложение к Heroku, и это выглядит как мои активы не прекомпиляции. Я думаю, это связано с тем, что файл database.yml настроен неправильно. Есть идеи?
Вот ошибка, когда я пытаюсь скомпилировать.
on RAILS_GROUPS=assets
Connecting to database specified by database.yml
rake aborted!
refer/happycumar.gif isn't precompiled (this is a giff in my assets folder)
Вот ошибка, когда я пытаюсь нажать на Heroku
Bundle completed (52.44s)
remote: Cleaning up the bundler cache.
remote: -----> Writing config/database.yml to read from DATABASE_URL
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: Connecting to database specified by DATABASE_URL
remote: rake aborted!
remote: could not connect to server: Connection refused
remote: Is the server running on host "127.0.0.1" and accepting
remote: TCP/IP connections on port 5432?
и
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: ! Attempted to access a nonexistent database:
remote: ! https://devcenter.heroku.com/articles/pre-provision-database
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to safe-tor-3231.
remote:
Вот мой Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'activeadmin'
gem 'pg'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
group :development do
gem 'pry'
end
gem 'rails_12factor'
gem 'delayed_job_active_record'
gem 'unicorn'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
Я думаю, что я следовал указаниям в документах, но я не уверен на 100%. Опять же, только из-за того, что происходит ошибка, я думаю, что это связано с файлом Database.yml.
database.yml файл .:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
development:
adapter: postgresql
database: prelaunchr
host: localhost
# 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
database: prelaunchr
host: localhost
production:
adapter: postgresql
database: prelaunchr
host: localhost
Это говорит тестовая база данных не должна быть такой же, как производство и развитие д.б.н., но я просто не знаю, что бы я изменить его, как для его правильной настройки, или если это вообще проблема ...
Спасибо за вашу помощь.