gpt4 book ai didi

ruby-on-rails - Gem 安装调试器错误

转载 作者:数据小太阳 更新时间:2023-10-29 06:27:51 25 4
gpt4 key购买 nike

我在 Mac OS 10.9.2 上运行 Rails v4.0.2,一切顺利。当我尝试 rails server 时,突然收到一条错误消息,提示缺少 gems。我运行 bundle install,这是输出:

Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Using rake 10.1.1
Using i18n 0.6.9
Using minitest 4.7.5
Using multi_json 1.9.0
Using atomic 1.1.16
Using thread_safe 0.2.0
Using tzinfo 0.3.39
Using activesupport 4.0.2
Using builder 3.1.4
Using erubis 2.7.0
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.0.2
Using mime-types 1.25.1
Using polyglot 0.3.4
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 4.0.2
Using activemodel 4.0.2
Using activerecord-deprecated_finders 1.0.3
Using arel 4.0.2
Using activerecord 4.0.2
Using encryptor 1.3.0
Using attr_encrypted 1.3.2
Using awesome_print 1.2.0
Using bcrypt 3.1.7
Using bcrypt-ruby 3.1.5
Using net-ssh 2.8.0
Using net-scp 1.1.2
Using tins 1.0.0
Using term-ansicolor 1.3.0
Using sshkit 1.3.0
Using capistrano 3.1.0
Using capistrano-bundler 1.1.2
Using capistrano-rails 1.1.1
Using climate_control 0.0.3
Using cocaine 0.5.3
Using coderay 1.1.0
Using coffee-script-source 1.7.0
Using execjs 2.0.2
Using coffee-script 2.2.0
Using thor 0.18.1
Using railties 4.0.2
Using coffee-rails 4.0.1
Using columnize 0.3.6
Using currencies 0.4.2
Using countries 0.9.3
Using debugger-linecache 1.2.0
Using debugger-ruby_core_source 1.3.2

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/Users/aaronpardes/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
*** 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=/Users/aaronpardes/.rvm/rubies/ruby-2.1.2/bin/ruby
/Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `stat': No such file or directory @ rb_file_s_stat - ./212/ruby_debug.h (Errno::ENOENT)
from /Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `block in fu_each_src_dest'
from /Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1587:in `fu_each_src_dest0'
from /Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1571:in `fu_each_src_dest'
from /Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:399:in `cp'
from extconf.rb:83:in `block in <main>'
from extconf.rb:82:in `each'
from extconf.rb:82:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/aaronpardes/.rvm/gems/ruby-2.1.2@ocx/gems/debugger-1.6.6 for inspection.
Results logged to /Users/aaronpardes/.rvm/gems/ruby-2.1.2@ocx/extensions/x86_64-darwin-13/2.1.0-static/debugger-1.6.6/gem_make.out
An error occurred while installing debugger (1.6.6), and Bundler cannot continue.
Make sure that `gem install debugger -v '1.6.6'` succeeds before bundling.

当我尝试运行 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.

/Users/aaronpardes/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
*** 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=/Users/aaronpardes/.rvm/rubies/ruby-2.1.2/bin/ruby
/Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `stat': No such file or directory @ rb_file_s_stat - ./212/ruby_debug.h (Errno::ENOENT)
from /Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `block in fu_each_src_dest'
from /Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1587:in `fu_each_src_dest0'
from /Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1571:in `fu_each_src_dest'
from /Users/aaronpardes/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:399:in `cp'
from extconf.rb:83:in `block in <main>'
from extconf.rb:82:in `each'
from extconf.rb:82:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/aaronpardes/.rvm/gems/ruby-2.1.2@ocx/gems/debugger-1.6.6 for inspection.
Results logged to /Users/aaronpardes/.rvm/gems/ruby-2.1.2@ocx/extensions/x86_64-darwin-13/2.1.0-static/debugger-1.6.6/gem_make.out

我很困惑为什么突然出现这个错误。我已经启动并运行了数周没有问题。我已经尝试使用 rvm 创建一个新的 gemset,但仍然遇到同样的问题。四处搜索后,我发现建议先更新依赖项,然后尝试 bundle install 但这并没有解决问题。

最佳答案

不幸的是,调试器不支持 Ruby 2.1.2。相反,使用 byebug gem . See this discussion了解更多详情。

关于ruby-on-rails - Gem 安装调试器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24395453/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com