部署 新手在 Heroku 部署时出现问题,无法加载 css,js,图片资源

zackteng · January 18, 2014 · Last by caleb328 replied at February 24, 2014 · 4042 hits

按照 railstutorial 的第五章教程做的,本地测试一切正常,但是传到 heroku 上就不行了 这是本地 这是部署到 heoku 上的显示 用 chrome 的 dug 模式看了下 然后又按照 stackoverflow 上一个帖子的方法 还是不行 大家帮我看下问题出在哪,卡这一天了 项目 github 地址:https://github.com/zackteng/sample_app heroku 部署的地址:http://zacktengsa.herokuapp.com/

在 Gemfile 里面加上 gem 'rails_12factor', group: :production https://github.com/heroku/rails_12factor

感谢楼上,问题已经找到了

group :production do
    gem 'pg', '0.15.1'
    gem 'rails_12factor', '0.0.2'
end

这里的:production 写成了:producation

亮了。。。

拼写系亮点...

其实我觉得 rails tutorial 那个教程也不是那么好,很容易进入一种抄代码的状态

#6 楼 @levi0214 现在已经看完了,对 rails 有了个大体的了解,有什么后续教程推荐么?

#7 楼 @zackteng http://ruby-china.org/topics/16547 这是我原来在思考的一个问题,希望能帮到你

#1 楼 @chareice 靠!原来是这样。我这几天都是手动 precompile assets,打命令打到死!!!!

额,我遇到这个问题,后来运行 Precompile 解决了

You need to Sign in before reply, if you don't have an account, please Sign up first.