【发布时间】:2014-01-12 02:25:46
【问题描述】:
我正在使用具有 nginx 和 unicorn 的数字海洋 ruby on rails 图像。我捆绑了我的项目bundle install,然后做了service unicorn restart,但它似乎没有加载。不久前我遇到了这个问题并使用bundle exec ... 解决了它,但我不记得完整的命令。我看到了一些与此类似的问题,并尝试了bundle exec rake assets:precompile 以及编辑 production.rb (Why "rails server -e production" makes it "No route matches "/" and stylesheet not loading?) 文件,但它不起作用。我正在寻找通过命令而不是通过代码执行此操作的解决方案。
编辑:bundle exec rake assets:precompile 确实有效!问题是我创建了一个名为 main.css 的额外 css 文件,它没有导入,但其他一切正常!
【问题讨论】:
标签: ruby-on-rails nginx unicorn