Sprockets :: FileNotFound与ZURB Foundation [英] Sprockets::FileNotFound with ZURB Foundation
问题描述
在Rails 3.2上使用Foundation 4.3.1时,出现以下错误:
When using foundation 4.3.1 on Rails 3.2 I get the following error:
Sprockets::FileNotFound in Refinery/pages#home
Showing ...../gems/refinerycms-92675b5132ae/core/app/views/refinery/_javascripts.html.erb where line #16 raised:
couldn't find file 'foundation'
(in ...../app/assets/javascripts/application.js:15)
我检查了所有内容,资产已打开,降级为Foundation的早期版本.但是没有什么能像它应该的那样工作(我在不同的Rails项目中也能正常运行)
I checked everything, assets are turned on, downgraded to an earlier version of Foundation. But nothing works like it should (I have the same thing running fine with a different Rails project)
Gemfile中的相关行:
relevant lines in Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.13'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'compass-rails'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'therubyracer', :platforms => :ruby
gem "zurb-foundation", "~> 4.3.1"
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
推荐答案
I had a similar problem, here: zurb-foundation gem not added to asset path in existing Rails 3.2 application
在我的案例中,问题在于使用mongomapper版本的旧宝石.如果您在Gemfile中使用该gem,请尝试将其删除并重新生成Gemfile.lock,看看是否能解决问题.
The problem in my case was with an old gem, mongomapper-versioned. If you are using that gem in your Gemfile, try removing it and regenerating your Gemfile.lock and see if that doesn't fix the problem.
如果您不使用该宝石,请尝试(在诊断分支中!)删除在香草导轨应用程序中找不到的所有宝石,并查看其中一个是否引起了问题.
If you are not using that gem, try (in a diagnostic branch!) removing all gems not found in a vanilla rails application and see if one of them is causing the problem.
这篇关于Sprockets :: FileNotFound与ZURB Foundation的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!