RuntimeError: can't modify frozen Array when running rspec in rails 5.1

前端 未结 14 2105
面向向阳花
面向向阳花 2021-01-03 20:10

I recently upgraded to Rails 5.1 from v4.3 and am now getting this error when running tests:

An error occurred while loading 

./spec/controllers/admin/capac         


        
14条回答
  •  感情败类
    2021-01-03 20:52

    Suggestion: try loading the app in development after adding config.eager_load = true to your development.rb file, which should give you an actually useful error message pinpointing the problem code.

    In my case, a Rails 5.2 app, it was purely a result of upgrading from Ruby 2.4.5 to 2.5.8 which pinpointed the sole issue was unmatched range specifier in char-class in a very long regex that has been working for years.

提交回复
热议问题