binding_of_caller icon indicating copy to clipboard operation
binding_of_caller copied to clipboard

RubyVM::DebugInspector (NameError)

Open JamesDullaghan opened this issue 11 years ago • 8 comments

/Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/binding_of_caller-0.7.2/lib/binding_of_caller/mri2.rb:21:in `callers': uninitialized constant RubyVM::DebugInspector (NameError)
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/better_errors-0.3.2/lib/better_errors/core_ext/exception.rb:9:in `block in <class:Exception>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.16/lib/active_support/testing/deprecation.rb:39:in `new'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.16/lib/active_support/testing/deprecation.rb:39:in `require'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.16/lib/active_support/testing/deprecation.rb:39:in `<top (required)>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.16/lib/active_support/test_case.rb:4:in `require'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-3.2.16/lib/active_support/test_case.rb:4:in `<top (required)>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-3.2.16/lib/action_controller/test_case.rb:355:in `<module:ActionController>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/actionpack-3.2.16/lib/action_controller/test_case.rb:7:in `<top (required)>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/shoulda-matchers-1.4.1/lib/shoulda/matchers/integrations/test_unit.rb:6:in `<top (required)>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/shoulda-matchers-1.4.1/lib/shoulda/matchers.rb:8:in `require'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/shoulda-matchers-1.4.1/lib/shoulda/matchers.rb:8:in `<top (required)>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/shoulda-matchers-1.4.1/lib/shoulda-matchers.rb:1:in `require'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/shoulda-matchers-1.4.1/lib/shoulda-matchers.rb:1:in `<top (required)>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from /Users/hippo/Development/responsive/config/application.rb:13:in `<top (required)>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/commands.rb:53:in `require'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/commands.rb:50:in `tap'
    from /Users/hippo/.rvm/gems/ruby-2.0.0-p353/gems/railties-3.2.16/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Any idea what is going on here?

JamesDullaghan avatar Dec 18 '13 00:12 JamesDullaghan

Hello @JamesDullaghan!

First of all, I assume you are using binding_of_caller from rubygems right?

Upgrading your better_errors version has any effect?

Would you mind trying it on master? If it doesn't works, could you share a reproducible snippet of this issue?

badosu avatar Dec 18 '13 19:12 badosu

Yes through rubygems. It works fine with ruby version 2.0.0-p247 and 1.9.3-p484, but not 2.0.0-p353.

I've uninstalled and reinstalled and made sure it's using the most recent version of better_errors

I will try using master now and let you know how that goes.

JamesDullaghan avatar Dec 18 '13 21:12 JamesDullaghan

Same error using

  gem 'binding_of_caller', :git => 'git://github.com/banister/binding_of_caller.git', :branch => 'master'

The installed version is 0.7.2 by the way.

better_errors versions is 1.0.1

JamesDullaghan avatar Dec 18 '13 21:12 JamesDullaghan

so how did you fix this?

pavankat avatar Mar 21 '14 02:03 pavankat

+1 for this, affects me --Ruby p247, binding_of_caller (0.7.2), better_errors (1.1.0) on Mavericks.

Iteratix avatar Mar 30 '14 21:03 Iteratix

+1 ruby 2.1.1p76, binding_of_caller(0.7.2), better_errors(1.1.0) on Mac OS X Lion 10.7.5

marzipan101 avatar Jun 27 '14 17:06 marzipan101

ghost of an earlier better_errors in your gems dir maybe?

try running

bundle install --path ~/your_project/bundle/gems

to use a local gems dir for the project (rather than your global)

landonwilkins avatar Jul 21 '14 17:07 landonwilkins

I was hitting the same error with ruby 2.x

Found that the root issue was i got gem debug_inspector, which is a binding_of_caller dependency with a C extension, installed without a proper Makefile and thus without the debug_inspector.so file in place. Steps to reproduce this situation unknown.

Due to the lack of .so file, require was failing silently here.

Solution for me was to reinstall gem like this:

$ gem uninstall debug_inspector
(project_root) $ bundle

grzuy avatar Dec 24 '14 15:12 grzuy

Looks like this issue is solved. If anyone needs to reopen, let me know.

prpetten avatar Mar 13 '24 03:03 prpetten