Skip to main content
Ask A Question
Notifications
You’re not receiving notifications from this thread.
Subscribe

Got error File to import not found or unreadable: foundation/functions.

Rails • Asked by geekdie

I upgraded my rails app ruby version from 2.2.1 to 2.5.1 and some its gems. When I load my rails app I got this error. Below are my gems:

gem 'mysql2', '< 0.5.0'
gem 'rails', '< 5.0.0'
gem 'sass-rails', '~> 5.0.0'
gem 'sprockets-es6'
gem 'font-awesome-rails'
gem 'foundation-rails'

Heres the details of the error:

File to import not found or unreadable: foundation/functions.
Load paths:
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/babel-source-5.8.35/lib
/home/jaydee/source/ruby-upgrade/shiftshark/app/assets/fonts
/home/jaydee/source/ruby-upgrade/shiftshark/app/assets/images
/home/jaydee/source/ruby-upgrade/shiftshark/app/assets/javascripts
/home/jaydee/source/ruby-upgrade/shiftshark/app/assets/stylesheets
/home/jaydee/source/ruby-upgrade/shiftshark/vendor/assets/javascripts
/home/jaydee/source/ruby-upgrade/shiftshark/vendor/assets/stylesheets
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/slick_rails-1.5.9/app/assets/fonts
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/slick_rails-1.5.9/app/assets/images
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/slick_rails-1.5.9/app/assets/javascripts
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/slick_rails-1.5.9/app/assets/stylesheets
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/foundation-rails-6.5.1.0/vendor/assets/_vendor
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/foundation-rails-6.5.1.0/vendor/assets/js
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/foundation-rails-6.5.1.0/vendor/assets/scss
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/font-awesome-rails-4.7.0.4/app/assets/fonts
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/font-awesome-rails-4.7.0.4/app/assets/stylesheets
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/local_time-2.1.0/app/assets/javascripts
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/jquery-rails-4.3.3/vendor/assets/javascripts
/home/jaydee/.rvm/gems/ruby-2.5.1/gems/coffee-rails-4.2.2/lib/assets/javascripts

Extracted source (around line #58):
// Allows the use of rem-calc() or lower-bound() in your settings
@import 'foundation/functions';

// The default font-size is set to 100% of the browser style sheet (usually 16px)
// for compatibility with browser-based text zoom or user-set defaults.


You might want to revert your foundation-rails gem back to the previous version, or see what's changed because it looks like the foundation/functions asset no longer exists like it used to. They may have just moved it or renamed it.


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 31,353+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.