Can't deploy to Heroku because the server refused the connection

被刻印的时光 ゝ 提交于 2019-12-04 03:26:27

Include the following in your application.rb, above the Module Appname

config.assets.initialize_on_precompile = false

And read the Heroku Labs: user-env-compile Article

I am using Rails 4.0.4 and none of the above worked for me.

Following the heroku documentation

RAILS_ENV=production bundle exec rake assets:precompile

then

git add public/assets
git commit -m "vendor compiled assets"

Resolved it partially for me ... I could 'git push heroku master' but then my Bootstrap styling is not applied.

To resolve this final part, I added the recommended 'rails_12factor' gem in my gemfile.

group :production do
  gem 'thin'
  gem 'rails_12factor'
end

And all worked fine after that after my git push

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!