【发布时间】:2012-06-10 17:32:13
【问题描述】:
我收到此错误:
Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError in Main#index
Showing /etc/apache2/CrawlFish/app/views/layouts/application.html.erb where line #15 raised:
jquery-ui-1.8.20.custom.min isn't precompiled
在 config/environements/production.rb 中,我添加了这一行:
config.assets.precompile += %w( jquery-ui-1.8.20.custom.min.js )
即使在这样做之后,我仍然收到上述预编译错误。在 public/assets/manifest.yml 中,没有 jquery-ui-1.8.20.custom.min.js 文件的条目。但是在 public/assets 中,会生成这些文件:
jquery-ui-1.8.20.custom.min-3ef66af7d5b20341b5fceb4ad1b2755f.js
jquery-ui-1.8.20.custom.min-3ef66af7d5b20341b5fceb4ad1b2755f.js.gz
jquery-ui-1.8.20.custom.min.js
jquery-ui-1.8.20.custom.min.js.gz
如何解决这个问题?
【问题讨论】:
-
application.html.erb 第 15 行说什么?
-
@AnatortoiseHouse:第 15 行:
标签: ruby-on-rails ruby production-environment