Sass::SyntaxError: File to import not found or unreadable: bootstrap-sprockets

前端 未结 15 1377
眼角桃花
眼角桃花 2020-11-30 03:40

I am suddenly getting this error in development and in production on deployment.

custom.css.scss

@import \"bootstrap-sprockets\";
@import \"bootstrap         


        
15条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-30 04:01

    I was also facing the similar error in development environment:

    Error Image

    I solved this problem by-

    1. In my gemfile, I added them -

      gem 'bootstrap', '~> 4.2.1'

      gem 'jquery-rails'

    2. In application.js file,add these -

      //= require jquery3

      //= require popper

      //= require bootstrap-sprockets

    3. In the file with .scss extension, simply add -

      @import "bootstrap";

      After that, just run bundle install

提交回复
热议问题