问题
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)
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)
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'
回答1:
I had a similar problem, here: zurb-foundation gem not added to asset path in existing Rails 3.2 application
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.
来源:https://stackoverflow.com/questions/17969750/sprocketsfilenotfound-with-zurb-foundation