Sprockets::FileNotFound with ZURB Foundation

℡╲_俬逩灬. 提交于 2020-01-06 01:22:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!