An error occurred while installing debugger-linecache (1.1.1), and Bundler cannot continue

拟墨画扇 提交于 2019-12-03 02:20:30

问题


Any idea how to fix this?

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/home/durrantm/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 
checking for vm_core.h... no
checking for vm_core.h... no
Makefile creation failed
**************************************************************************
No source for ruby-1.9.3-p194 provided with debugger-ruby_core_source gem.
**************************************************************************

回答1:


I had this issue after updating to a newer patch version of ruby. Unfortunately the header files gem "debugger-ruby_core_source" was locked in to an earlier version in the Gemfile.lock so it didn't have the required header files.

All you need to do is update that gem by doing:

bundle update debugger-ruby_core_source

You should be able to bundle install afterwards.

If you aren't using bundler then just install the latest version before trying to install debugger:

gem install debugger-ruby_core_source



回答2:


Another option is to switch to using ruby p125, e.g.

rvm install 1.9.3-p125
rvm use 1.9.3-p125 --default

I had ruby 1.9.3-p194 and apparently that doesn't have the debug/linecache I need.




回答3:


open terminal, go to project directory and remove Gemfile.lock using

 rm Gemfile.lock

to remove Gemfile.lock and run

bundle install 

which will create new Gemfile.lock so its easy to do it :)

worked for me.



来源:https://stackoverflow.com/questions/11354768/an-error-occurred-while-installing-debugger-linecache-1-1-1-and-bundler-canno

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