由于未初始化的常量RubyVM :: DebugInspector错误

时间:2018-07-04 04:43:16

标签: ruby-on-rails ruby-on-rails-4

我在Gemfile中有一个带有此代码块的Rails 4.2.8应用程序:

group :development do
  gem "thin"
  gem "letter_opener"
  gem "rubocop", "~> 0.49.1", require: false
  gem "better_errors"
  gem "binding_of_caller"
end

我能够很好地启动该应用程序,但是一旦它尝试处理请求(例如,加载网页),它就会失败,并在浏览器页面“内部服务器错误”中显示此错误消息,并且log / development.log文件:

    Unexpected error while processing request: uninitialized constant RubyVM::DebugInspector
/approot/vendor/bundle/ruby/2.3.0/gems/binding_of_caller-0.7.2/lib/binding_of_caller/mri2.rb:21:in callers
/approot/vendor/bundle/ruby/2.3.0/gems/better_errors-2.4.0/lib/better_errors/exception_extension.rb:7:in set_backtrace
/approot/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/inflector/methods.rb:276:in const_get
/approot/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/inflector/methods.rb:276:in block in constantize
/approot/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/inflector/methods.rb:259:in each
/approot/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/inflector/methods.rb:259:in inject
/approot/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/inflector/methods.rb:259:in constantize
/approot/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/inflector/methods.rb:304:in safe_constantize
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/inheritance.rb:154:in block in compute_type
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/inheritance.rb:153:in each
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/inheritance.rb:153:in compute_type
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/reflection.rb:295:in compute_class
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/reflection.rb:291:in klass
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/association.rb:118:in klass
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/preloader.rb:158:in block in grouped_records
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/preloader.rb:154:in each
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/preloader.rb:154:in grouped_records
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/preloader.rb:143:in preloaders_for_one
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/preloader.rb:115:in preloaders_on
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/preloader.rb:103:in block in preload
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/preloader.rb:102:in each
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/preloader.rb:102:in flat_map
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/associations/preloader.rb:102:in preload
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation.rb:645:in block in exec_queries
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation.rb:644:in each
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation.rb:644:in exec_queries
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation.rb:515:in load
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation.rb:243:in to_a
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation/finder_methods.rb:475:in find_take
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation/finder_methods.rb:105:in take
/approot/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/relation/finder_methods.rb:84:in fi

0 个答案:

没有答案