No source for ruby-1.9.2-p321 provided with debugger-ruby_core_source gem

不羁岁月 提交于 2019-12-10 14:39:30

问题


I recently updated to Mavericks. Added Command Line tools for xcode. Tried "bundle update debugger", along with every other fix I found, including this rake add_source to include the appropriate header found here:http://sponsorpay.github.io/blog/2012/06/11/ruby-debugger-and-no-source-for-ruby-error/, and I still cannot push my project to heroku without errors. Any help is appreciated. Thanks in advance.

Update: Found this but not sure how to do it. "Gems such as debugger-linecache require explicit patch levels of Ruby, this is fine for development, but should not be used in production. If you have one of these Gems in production and the patch of Ruby gets upgraded your deploy will fail.

The fix is to move your dependency out of the production group of your Gemfile." Here's the error:

Installing debugger-linecache (1.2.0) Installing debugger-ruby_core_source (1.2.4) Installing debugger (1.6.3) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

   /tmp/ruby-1.9.2/bin/ruby extconf.rb
   checking for rb_method_entry_t.body in method.h... no
   checking for vm_core.h... no
   checking for rb_method_entry_t.body in method.h... no
   checking for vm_core.h... no
   Makefile creation failed
   **************************************************************************
   No source for ruby-1.9.2-p321 provided with debugger-ruby_core_source gem.
   **************************************************************************
   *** extconf.rb failed ***
   Could not create Makefile due to some reason, probably lack of
   necessary libraries and/or headers.  Check the mkmf.log file for more
   details.  You may need configuration options.

   Provided configuration options:
   --with-opt-dir
   --without-opt-dir
   --with-opt-include
   --without-opt-include=${opt-dir}/include
   --with-opt-lib
   --without-opt-lib=${opt-dir}/lib
   --with-make-prog
   --without-make-prog
   --srcdir=.
   --curdir
   --ruby=/tmp/ruby-1.9.2/bin/ruby
   --with-ruby-dir
   --without-ruby-dir
   --with-ruby-include
   --without-ruby-include=${ruby-dir}/include
   --with-ruby-lib
   --without-ruby-lib=${ruby-dir}/lib


   Gem files will remain installed in /tmp/build_3f34841b-c8ae-4ac7-a6ff-9cdb26e947fa/vendor/bundle/ruby/1.9.1/gems/debugger-1.6.3 for inspection.
   Results logged to /tmp/build_3f34841b-c8ae-4ac7-a6ff-9cdb26e947fa/vendor/bundle/ruby/1.9.1/gems/debugger-1.6.3/ext/ruby_debug/gem_make.out
   An error occurred while installing debugger (1.6.3), and Bundler cannot
   continue.
   Make sure that `gem install debugger -v '1.6.3'` succeeds before bundling.

! ! Failed to install gems via Bundler. !

! Push rejected, failed to compile Ruby app


回答1:


I added this to my gemfile

gem 'debugger', group: [:development, :test] 

to my gem file.

Removed my gem lock file with rm Gemfile.lock. Ran bundle install, and the push succeeded.




回答2:


The answer for me was to update debugger per the blog below using this command:

bundle update debugger-ruby_core_source

http://blog.wercker.com/2014/01/02/Ruby-Gems-and-caches.html

This bug report also supports that approach: https://github.com/cldwalker/debugger/issues/63



来源:https://stackoverflow.com/questions/20461846/no-source-for-ruby-1-9-2-p321-provided-with-debugger-ruby-core-source-gem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!