使用引擎、nginx、乘客的应用程序中的 Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError
我有一个使用引擎的应用程序(由 Gemfile gem my_engine, path=> '../my_engine' 包含)。它与rails 服务器配合得很好。我决定将其与乘客一起移至 nginx,但出现错误。
Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError
auth_engine.css 未预编译 提取的源代码(第 1 行附近): 1: <%= stylesheet_link_tag "auth_engine" %> 2: 3:
4: <% flash.each do |key, value| %>
auth_engine.css 位于 my_engine/app/assets/stylesheets
如何解决此问题?
I have an application which uses an engine (included by Gemfile gem my_engine, path=> '../my_engine'). It works nice with rails server. I decided to move it to nginx with passenger, but I get an error.
Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError
auth_engine.css isn't precompiled Extracted source (around line #1): 1: <%= stylesheet_link_tag "auth_engine" %> 2: 3: <div class="form"> 4: <% flash.each do |key, value| %>
auth_engine.css is located in my_engine/app/assets/stylesheets
How to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您只是单独链接到该样式表,而不是让 Rails 滚动到 application.css 中。在这种情况下,您只需将其移动到 public/assets/stylesheets 文件夹即可使用它,而无需编译它。
It looks like you're just linking to that one stylesheet separately instead of just letting rails roll into application.css. In that case, you should just move it to the public/assets/stylesheets folder to use it without compiling it.