2013-12-09 49 views
5

我最近更新到小牛队。为xcode添加了命令行工具。试过了“软件包更新调试器”,以及我发现的其他所有修复,包括这个rake add_source,以包含在这里找到的适当头文件:http://sponsorpay.github.io/blog/2012/06/11/ruby-debugger-and-no-source-for-ruby-error/,我仍然无法将我的项目推送到heroku而没有错误。任何帮助表示赞赏。提前致谢。ruby​​-1.9.2-p321没有提供调试器的源代码-ruby_core_source gem

更新:发现这一点,但不知道该怎么做。 “诸如debugger-linecache之类的宝石需要显式的补丁级别的Ruby,这对于开发来说是很好的,但不应该用于生产。如果你在生产中有这些Gems 之一,并且Ruby的补丁得到升级,你的部署将会失败。

解决方法是将您的依赖项移出Gemfile的生产组。 这里的错误:

安装调试,linecache(1.2.0) 安装调试,ruby_core_source(1.2.4) 安装调试器(1.6.3) 宝石::安装:: ExtensionBuildError:错误:未能建立宝石本地扩展。

/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. 

! !无法通过Bundler安装宝石。 !

!推送拒绝,未能Ruby编译应用程序

+2

谢谢。删除(重命名)我的Gemfile.lock,然后再次运行包解决了我的问题。这是第一次在这台机器上捆绑这个回购。如果任何人有兴趣,成功捆绑包括以下输出:使用debugger-linecache(1.2.0) 安装debugger-ruby_core_source(1.3.1) 安装调试器(1.6.5) – Patrick

回答

1

我将此添加到我的Gemfile

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

我的宝石文件。

删除了我的宝石锁文件rm Gemfile.lock。然后bundle install,并推送成功。

+0

删除我的答案。感谢您发布您的解决方案。 –

+0

这是一个危险的举动,特别是如果您的Gemfile没有谨慎指定版本,因为您可以通过重大更改来更新宝石。 – Agustin