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

前端 未结 15 1379
眼角桃花
眼角桃花 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:07

    make sure you run the following commands after adding this gem to your Gemfile put this inside your Gemfile

        gem "bootstrap-sprockets", "~>3.3"
        gem "bootstrap"
    

    now stop your server and run the following:

        bundle install
        rails server
    

    to restart your server. Refresh your browser and you should see changes reflect immediately. In production you may have to run this command to precompile your assets:

        bundle exec bin/rake assets:precompile
    

    It worked for me. Hope this was helpful.

提交回复
热议问题