Ask A Question

Notifications

You’re not receiving notifications from this thread.

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

geekdie asked in Rails

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.

Reply

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.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,110+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.