2012-01-04 121 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) 

我想弄清楚我的應用程序的哪個部分正在嘗試初始化數據庫,以便我可以修復它,但是我已經用盡了獲取更多調試信息的想法。

任何人有任何提示,要麼獲得有關我的應用程序嘗試啓動數據庫的位置的更多信息,要麼解決底層問題?

回答

相關問題