$ rake assets:precompile
rake aborted!
could not connect to server: Network is unreachable
Is the server running on host "192.168.163.70" and accepting
TCP/IP connections on port 5432?
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/usr/local/Cellar/ruby/1.9.3-p0/bin/ruby /...]
所以我想在我的開發盒上預編譯資產。出於某種原因,它試圖連接到生產數據庫(192.168.163.70),並且當它不能這樣做時,它會中止。rake資產:預編譯嘗試連接到生產數據庫?
它爲什麼這樣做,我該如何解決這個問題?
即使在我的項目中沒有rake任務,我也有同樣的問題。在預編譯資產時,耙子堅持連接到生產數據庫。我可以通過更改database.yml來將其生產指向dev數據庫來暫時解決此問題,但這樣可以輕鬆地將指向指向錯誤的數據庫。有更好的解決方案 – 2012-05-10 14:24:21
我想嘗試調試並找到導致資產預編譯加載生產配置的原因。不幸的是,我沒有更好的建議。 – randomguy 2012-05-11 12:38:10