2016-01-10 69 views
0

我正在使用Harry的Shave club开源代码设置病毒登陆页面栏应用程序。无法配置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 

报告说,测试数据库不应该是一样的生产和开发DBS,但我只是不知道我想改变它,怎么正确配置它,或者如果这甚至是所有问题...

感谢您的帮助。

回答