2012-01-04 72 views
2

我试图使用资产管道升级到Rails 3.1后,将应用程序部署到Heroku。我跑进对Heroku的troubleshooting page提到的常见的问题,收到错误时:Rails 3.1资产:预编译连接到数据库

could not connect to server: Connection refused 
Is the server running on host "127.0.0.1" and accepting 
TCP/IP connections on port xxxx? 

我把建议在页面上,增加了以下我的config/application.rb中的文件(以后也试图将其添加到个别[环境] .RB文件没有效果)

config.assets.initialize_on_precompile = false 

我修改我的database.yml文件,以我的生产环境指向一个不存在的数据库,但在运行时的资产:预编译任务在本地,我得到以下内容:

> RAILS_ENV=production bundle exec rake assets:precompile --trace 
** Invoke assets:precompile (first_time) 
** Execute assets:precompile 
rake aborted! 
FATAL: database "my_nonexistant_database" does not exist 

Tasks: TOP => environment 
(See full trace by running task with --trace) 

我想弄清楚我的应用程序的哪个部分正在尝试初始化数据库,以便我可以修复它,但是我已经用尽了获取更多调试信息的想法。

任何人有任何提示,要么获得有关我的应用程序尝试启动数据库的位置的更多信息,要么解决底层问题?

回答

相关问题