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

后端 未结 2 1180
無奈伤痛
無奈伤痛 2021-02-01 15:49

Getting error:

undefined method `environment\' for nil:NilClass
Extracted source (around line #5):


  Dossiyadata
  <%         


        
2条回答
  •  北海茫月
    2021-02-01 16:17

    I also met that exact same error after I upgraded rails from 4.0.3 to 4.0.4.

    To solve solve this problem, only add

    gem "sass-rails", "~> 4.0.2"
    

    to your Gemfile and then

    bundle install
    

    Finally restart rails server

    Then enjoy your programming in rails 4.0.4

提交回复
热议问题