undefined method `environment' for nil:NilClass when importing Bootstrap

后端 未结 5 735
隐瞒了意图╮
隐瞒了意图╮ 2020-12-08 00:32

I\'ve been trying to import Bootstrap into my rails app and I\'m not quite sure what\'s going wrong. I\'ve had it working before, but I did a \'bundle update\' and destroyed

5条回答
  •  抹茶落季
    2020-12-08 00:53

    I just ran into this issue, after updating sass to 3.3.3 and sprockets to 2.12.0.

    I ran a $ bundle outdated to check for which gems were outdated, and indeed sass-rails was included:

    * sass-rails (4.0.2 > 4.0.1)
    

    Using $ bundle update sass-rails solved it for me.

    If you use $ bundle update instead, it would also solve the issue but will update other non-version-constrained gems too. Updating your gems one by one is more time-consuming, but is more useful for diagnosing the gem conflict.

提交回复
热议问题