Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails perftools上的捆绑安装失败_Ruby On Rails_Ruby_Bundler - Fatal编程技术网

Ruby on rails perftools上的捆绑安装失败

Ruby on rails perftools上的捆绑安装失败,ruby-on-rails,ruby,bundler,Ruby On Rails,Ruby,Bundler,使用bundle install安装perftools时出错。我得到: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb (I'm about to compile google-perftools.. this wi

使用bundle install安装perftools时出错。我得到:

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

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
(I'm about to compile google-perftools.. this will definitely take a while)
  -- tar zpxvf gperftools-2.0.tar.gz
  -- patch -p1 < ../../../patches/perftools.patch
  -- patch -p1 < ../../../patches/perftools-notests.patch
  -- patch -p1 < ../../../patches/perftools-pprof.patch
  -- patch -p1 < ../../../patches/perftools-gc.patch
  -- patch -p1 < ../../../patches/perftools-debug.patch
  -- patch -p1 < ../../../patches/perftools-objects.patch
  -- patch -p1 < ../../../patches/perftools-frames.patch
  -- patch -p1 < ../../../patches/perftools-realtime.patch
  -- patch -p1 < ../../../patches/perftools-pause.patch
  -- sed -i -e 's,SpinLock,ISpinLock,g' src/*.cc src/*.h src/base/*.cc src/base/*.h
  -- ./configure --disable-heap-profiler --disable-heap-checker --disable-debugalloc --disable-shared
  -- make
checking for method.h... no
checking for vm_core.h... no
checking for method.h... no
checking for vm_core.h... no
checking for method.h... yes
checking for vm_core.h... yes
checking for iseq.h... no


***************************************************************************************
****************** Debugger::RubyCoreSource::create_makefile FAILED *******************
***************************************************************************************
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby


Gem files will remain installed in /var/folders/j9/ghqqd20n13q5kjn2w0btg18m0000gn/T/bundler20140505-18890-1n58ssn/perftools.rb-2.0.1/gems/perftools.rb-2.0.1 for inspection.
Results logged to /var/folders/j9/ghqqd20n13q5kjn2w0btg18m0000gn/T/bundler20140505-18890-1n58ssn/perftools.rb-2.0.1/gems/perftools.rb-2.0.1/ext/gem_make.out
An error occurred while installing perftools.rb (2.0.1), and Bundler cannot continue.
Make sure that `gem install perftools.rb -v '2.0.1'` succeeds before bundling.  
Gem::Installer::ExtensionBuildError:错误:无法生成Gem本机扩展。
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/Ruby extconf.rb
(我即将编译google perftools..这肯定需要一段时间)
--tar zpxvf gperftools-2.0.tar.gz
--修补程序-p1<../../../patches/perftools.patch
--修补程序-p1<../../../patches/perftools-notests.patch
--修补程序-p1<../../../patches/perftools-pprof.patch
--修补程序-p1<../../../patches/perftools-gc.patch
--修补程序-p1<../../../patches/perftools-debug.patch
--修补程序-p1<../../../patches/perftools-objects.patch
--修补程序-p1<../../../patches/perftools-frames.patch
--修补程序-p1<../../../patches/perftools-realtime.patch
--修补程序-p1<../../../patches/perftools-pause.patch
--sed-i-e's,SpinLock,ISpinLock,g'src/*.cc src/*.h src/base/*.cc src/base/*.h
--./configure--disable heap profiler--disable heap checker--disable debugalloc--disable shared
--制造
检查方法。h。。。不
正在检查vm_core.h。。。不
检查方法。h。。。不
正在检查vm_core.h。。。不
检查方法。h。。。对
正在检查vm_core.h。。。对
正在检查iseq.h。。。不
***************************************************************************************
******************调试器::RubyCoreSource::创建\u makefile失败*******************
***************************************************************************************
***extconf.rb失败***
由于某些原因无法创建Makefile,可能缺少必要的
库和/或标题。有关详细信息,请查看mkmf.log文件。你可以
需要配置选项。
提供的配置选项:
--使用opt dir
--不带opt dir
--选择包含
--不带opt include=${opt dir}/include
--使用opt lib
--不带opt lib=${opt dir}/lib
--用make prog
--没有make prog
--srcdir=。
--库尔迪尔
--ruby=/System/Library/Frameworks/ruby.framework/Versions/2.0/usr/bin/ruby
Gem文件将继续安装在/var/folders/j9/ghqd20n13q5kjn2w0btg18m0000gn/T/bundler20140505-18890-1n58ssn/perftools.rb-2.0.1/gems/perftools.rb-2.0.1中以供检查。
结果记录到/var/folders/j9/GHQQD20N13Q5KJN2W0BTG18M000GN/T/bundler20140505-18890-1n58ssn/perftools.rb-2.0.1/gems/perftools.rb-2.0.1/ext/gem_make.out
安装perftools.rb(2.0.1)时出错,捆绑程序无法继续。
在绑定之前,请确保'gem install perftools.rb-v'2.0.1'成功。
但是,当我执行
gem安装perftools.rb-v'2.0.1'
时,它会正确构建和安装

我使用的是ruby 2.0.0-p353和rbenv 0.4.0。我使用的是gcc版本4.2.1


我也尝试过用ruby 1.9.3捆绑安装,但也遇到了同样的错误。我应该怎么做才能解决这个问题?

您可以发布错误提到的mkmf.log文件吗?错误输出中是否存在关于丢失文件的任何其他错误?如果它在没有bundler的情况下正确安装,可能bundler是在不同的环境中运行的(查看.bundle/config,如果它存在的话,比较ruby-v和bundle exec ruby-v可能也有帮助)


我在尝试建立一个项目时遇到了类似的情况,该项目使用了与ubuntu14.04上的ruby版本相同的gem,gcc版本为4.8.2,bundler版本为1.7.4。奇怪的是,在bundle安装失败后再次运行bundle安装对我来说很有效,但我还没有机会深入了解原因/

这似乎不是Ruby的问题,而是perftools编译的问题。