gpt4 book ai didi

ruby-on-rails - 调试器不会安装 Rails 4.1.5

转载 作者:数据小太阳 更新时间:2023-10-29 08:22:45 24 4
gpt4 key购买 nike

所以我尝试做一个bundle update,我得到了:

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

/home/adam/.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=/home/adam/.rvm/rubies/ruby-2.1.2/bin/ruby /home/adam/.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
/home/adam/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in
block in fu_each_src_dest' from /home/adam/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1587:in fu_each_src_dest0' from
/home/adam/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1571:in
fu_each_src_dest' from /home/adam/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:399:in cp' from extconf.rb:83:inblock in ' from extconf.rb:82:in each' from extconf.rb:82:in'

extconf failed, exit code 1

Gem files will remain installed in /home/adam/.rvm/gems/ruby-2.1.2/gems/debugger-1.6.8 for inspection. Results logged to /home/adam/.rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0/debugger-1.6.8/gem_make.out An error occurred while installing debugger (1.6.8), and Bundler cannot continue. Make sure that gem install debugger -v '1.6.8' succeeds before bundling.

所以我尝试执行以下操作:gem install debugger -v '1.6.8' 并得到了

Building native extensions. This could take a while... ERROR: Error installing debugger: ERROR: Failed to build gem native extension.

/home/adam/.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=/home/adam/.rvm/rubies/ruby-2.1.2/bin/ruby /home/adam/.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
/home/adam/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in
block in fu_each_src_dest' from /home/adam/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1587:in fu_each_src_dest0' from
/home/adam/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1571:in
fu_each_src_dest' from /home/adam/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:399:in cp' from extconf.rb:83:inblock in ' from extconf.rb:82:in each' from extconf.rb:82:in'

extconf failed, exit code 1

Gem files will remain installed in /home/adam/.rvm/gems/ruby-2.1.2/gems/debugger-1.6.8 for inspection. Results logged to /home/adam/.rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0/debugger-1.6.8/gem_make.out

我有 4 个其他 Rails 应用程序都在运行 4.1.5,它们都没有问题 bundle update 所以这是怎么回事?

最佳答案

调试器 gem 不应该与 ruby 2.0+ 一起使用,并且实际上不会与 ruby 2.1.2 一起安装。您将不得不切换到 byebug .

如果你是 pry 的粉丝,还有 pry-byebug

这是我的 Gemfile 中的调试 gem 在 Rails 4 和 Ruby 2.1.2 中的样子

group :development do
gem 'pry'
gem 'pry-remote'
gem 'pry-rails'
gem 'pry-stack_explorer'
gem 'pry-byebug'
end

关于ruby-on-rails - 调试器不会安装 Rails 4.1.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25455695/

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