ruby-on-railsruby-on-rails-4.2

undefined method `env' for nil:NilClass after Rails upgrade 4.2.8 from 4.0.1


I recently upgraded rails from 4.0.1 to 4.2.8. After upgrading I am getting below issue. I tried to resolve by upgrading devise gem but it didn't help.

undefined method `env' for nil:NilClass

enter image description here


Solution

  • Per this issue peek 1.1.0 introduced some changes that work with rails 5.

    It looks like peek 1.0.1, https://github.com/peek/peek/blob/v1.0.1/lib/peek/railtie.rb, does not have that change so, locking peek to 1.0.1 should fix the issue .