gpt4 book ai didi

ruby-on-rails - 使用 Rails 3.1 预编译 Assets

转载 作者:行者123 更新时间:2023-12-03 23:14:54 24 4
gpt4 key购买 nike

我正在插入对 Heroku 的更改,我得到了......

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



当我查阅 Heroku 文档时 Here ,它告诉我我需要“在本地 config/database.yml 中配置一个不存在的数据库”我不知道如何创建一个“不存在的数据库”?我是初学者,如果您能给我任何帮助,我将不胜感激。谢谢。

最佳答案

在 Heroku 上,您 必须在你的 config/application.rb 中设置这一行:

config.assets.initialize_on_precompile = false

http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets

For faster asset precompiles, you can partially load your application by setting config.assets.initialize_on_precompile to false in config/application.rb, though in that case templates cannot see application objects or methods. Heroku requires this to be false.

关于ruby-on-rails - 使用 Rails 3.1 预编译 Assets ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7990049/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com