diff --git a/lib/better_errors.rb b/lib/better_errors.rb index ee7a48bd..8cd6b7ec 100644 --- a/lib/better_errors.rb +++ b/lib/better_errors.rb @@ -3,6 +3,7 @@ require "coderay" require "uri" +require "better_errors/version" require "better_errors/code_formatter" require "better_errors/inspectable_value" require "better_errors/error_page" @@ -10,7 +11,6 @@ require "better_errors/raised_exception" require "better_errors/repl" require "better_errors/stack_frame" -require "better_errors/version" module BetterErrors POSSIBLE_EDITOR_PRESETS = [ diff --git a/lib/better_errors/middleware.rb b/lib/better_errors/middleware.rb index 8215c70b..3a437819 100644 --- a/lib/better_errors/middleware.rb +++ b/lib/better_errors/middleware.rb @@ -40,7 +40,7 @@ def self.allow_ip!(addr) allow_ip! "127.0.0.0/8" allow_ip! "::1/128" rescue nil # windows ruby doesn't have ipv6 support - CSRF_TOKEN_COOKIE_NAME = "BetterErrors-#{VERSION}-CSRF-Token" + CSRF_TOKEN_COOKIE_NAME = "BetterErrors-#{BetterErrors::VERSION}-CSRF-Token" # A new instance of BetterErrors::Middleware #