Closed brunoadacosta closed 10 years ago
Thanks for reporting your issue! This is one of my 10 active issues. Use that link to check how soon your issue will be answered. Don't forget to check your issue against this project's CONTRIBUTING.md. Cheers.
me too 2.1.1 install error
Is #119 all that is necessary to get this working?
I don't think so. Looks like the debugger-ruby_core_source dependency needs to be updated. Even if checked out from master, ruby-debug.so cannot be located post-bundle.
What am I missing? Using my forked repo in Gemfile I was able to install the gem and to run a debug session inside a rails app using ruby 2.1.1.
While earlier I was getting the exact same above error.
Nothing, debugger-ruby_core_source dependency gem was updated yesterday. I imagine your fork would work now. It wasn't updated when I was testing.
1.6.6 should resolve this
I can confirm 1.6.6 works. Thanks!
1.6.6 does not solve this problem on Mac OS X 10.9.2 with an rvm-installed ruby 2.1.1.
Note: debugger-ruby_core_source is at version 1.3.2.
From command: gem install debugger
Building native extensions. This could take a while... ERROR: Error installing debugger: ERROR: Failed to build gem native extension.
/Users/adrianklingel/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for rb_method_entry_t.called_id in method.h... no checking for rb_control_frame_t.method_id in method.h... no checking for rb_method_entry_t.called_id in method.h... no checking for rb_control_frame_t.method_id in method.h... no checking for rb_method_entry_t.called_id in method.h... no checking for rb_control_frame_t.method_id in method.h... no Makefile creation failed
NOTE: If your headers were not found, try passing --with-ruby-include=PATH_TO_HEADERS
Unfortunately have no idea where ruby headers might live, so command can't be used.
UPDATE I found where the ruby headers are supposed to be under ~/.rvm/rubies//include
So I have 2 rubies: 1.9.3p545 and 2.1.1
If I:
-> cd ~/.rvm/rubies -> grep -i -r rb_method_entry_t .
then all I get back is:
Binary file ./ruby-1.9.3-p545/lib/libruby.1.9.1-static.a matches
That explains why debugger installs under 1.9.3, but not 2.1.1. How do I get those static libs to build for 2.1.1? Keep in mind this is all happening after an upgrade to Mavericks.
This fixed my issue:
rvm get stable (I had done an "rvm get head" before) rvm reinstall 2.1.1 --disable-binary rm Gemfile.lock (from my app root)
After that,
gem install debugger -v '1.6.6'
went off without a hitch.
@HuckyDucky - I followed your instructions - on a Mac with OS/X 10.9.2 - Rails 4.1.0 - RSpec 2.14.8 - entered the word 'debugger' in spec/features/my_spec.rb in the 'before do' section - and ran rspec spec/features/my_spec.rb --debugger and this is what happened: activerecord-4.1.0/lib/active_record/attribute_methods.rb:196: [BUG] Segmentation fault at 0x00000000000018 ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0] etc.
...and Ruby 2.1.1
Same here, after following the instructions from @HuckyDucky:
Started GET "/" for 127.0.0.1 at 2014-04-18 17:21:44 -0500
ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
/Users/fritza/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/attribute_methods.rb:196: [BUG] Segmentation fault at 0x00000000000018
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
Previously, if I started the server without --debugger
, and used
require 'debugger'
# ...
debugger
I’d get a debugger console, though one that descended calls regardless, and refused stack traces. It gave glimpses of the intended behavior, such as the damned are permitted of heaven.
OS X 10.9.2, rvm management, debugger 1.6.6, all refreshed as above.
Not fixed with debugger 1.6.6 for me either – on a Mac with OSX 10.8.5, Ruby 2.1.1 installed via rvm after rvm get head
.
@HuckyDucky's instructions helped, though. I could successfully bundle without deleting Gemfile.lock:
rvm get stable
rvm reinstall 2.1.1 --disable-binary
gem install debugger -v '1.6.6'
bundle
Debugging seems to work fine now (tried a binding.pry
with next
).
Hi - am getting the same issue. Please suggest.
# gem install debugger -v '1.6.6'
Building native extensions. This could take a while...
ERROR: Error installing debugger:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/jruby-1.7.12/bin/jruby extconf.rb
/usr/local/rvm/rubies/jruby-1.7.12/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of obsolete and deprecated Config.
mkmf.rb can't find header files for ruby at /usr/local/rvm/rubies/jruby-1.7.12/lib/native/include/ruby/ruby.h
extconf failed, uncaught signal 1
Gem files will remain installed in /usr/local/rvm/gems/jruby-1.7.12/gems/debugger-1.6.6 for inspection.
Results logged to /usr/local/rvm/gems/jruby-1.7.12/extensions/universal-java-1.6/1.9/debugger-1.6.6/gem_make.out
Also...
# rvm list
rvm rubies
=> jruby-1.7.12 [ x86_64 ]
* ruby-1.9.3-p545 [ x86_64 ]
ruby-2.1.1 [ x86_64 ]
+1
@ananthkollipara @patrickespake jruby is not supported by debugger
or byebug
... sorry
Sorry to keep piling on, but ruby 2.1.2 is missing the ruby_debug.h header too
I'm using ruby 2.1.2, switching to 1.9.1 and bundle installing with success and using 2.1.2 has any effect in development process ?
You must bundle with the version of ruby that you are using because some gems are compiled using the headers that come with the version of ruby that you are using.
Hal
On Oct 27, 2014, at 4:35 AM, Milan Rawal notifications@github.com wrote:
I'm using ruby 2.1.2, switching to 1.9.1 and bundle installing with success and using 2.1.2 has any effect in development process ?
— Reply to this email directly or view it on GitHub.