简体   繁体   English

Ruby on Rails gem'byebug'安装错误

[英]Ruby on Rails gem 'byebug' installing error

这是“ byebug”安装的错误。

How can I fix this error? 如何解决此错误? This issue is created when I check the rails version in a demo created website using this command. 当我使用此命令在演示创建的网站中检查rails版本时,就会创建此问题。

you can also use another debugger gem 'pry', '0.9.12.6' and remove gem 'byebug' . 您还可以使用其他调试器gem'pry''0.9.12.6'并删除gem'byebug'。

Then run bundle install 然后运行捆绑安装

The output in yellow is asking you to run bundle install instead of gem install 黄色的输出要求您运行bundle install而不是gem install

You should do that. 你应该那样做。

Update: 更新:

It looks like the windows version build is failing. 看来Windows版本构建失败。 Only passes for ruby 2.0.0 but not for above versions. 仅适用于ruby 2.0.0,不适用于以上版本。

You can check the status at byebug's github project and the windows build status 您可以在byebug的github项目Windows构建状态中查看状态

The compiler is set to treat warnings as errors. 编译器设置为将警告视为错误。 You can compile the extension manually after switching off -Werror in the Makefile. 关闭Makefile中的-Werror后,可以手动编译扩展名。 If that works, you must register the gem also manually like so: 如果可行,您还必须手动注册gem,如下所示:

gem spec [something like Ruby21/lib/ruby/gems/2.1.0]/cache/byebug-5.0.0.gem --ruby > \
[something like Ruby21/lib/ruby/gems/2.1.0]/specifications/byebug-5.0.0.gemspec

This has nothing to do with the build (it's passing in the released version , and in any case, it's not failing at compile time). 这与构建无关(它传递了发布的版本 ,无论如何,它不会在编译时失败)。

It might or might not be problem in byebug (I think it's more likely something with your Ruby / DevKit installation though), but it's not manifested in the CI build for sure. 在byebug中可能有问题,也可能没有问题(我认为您的Ruby / DevKit安装中更可能有问题),但肯定不会在CI构建中体现出来。

That being said, the error can certainly be solved by just removing the gem from the Gemfile and running bundle install again. 话虽如此,只要从Gemfile中删除gem并再次运行bundle install ,就可以解决错误。

So I had the same problem for ruby version 2.1.7 and after some reading this is how i solved it . 所以我对红宝石版本2.1.7遇到了同样的问题,经过阅读后,这就是我解决的方法。 I just replaced gem 'byebug' with gem 'pry' and it just worked like magic ! 我只是将宝石“ byebug”替换为宝石“ pry”,它就像魔术一样工作!

I solved this reinstalling my devkit in windows. 我解决了在Windows中重新安装devkit的问题。

First I went to mi devkit folder and i wrike 首先我去了mi devkit文件夹,但我不满意

ruby dk.rb init 
ruby dk.rb review
ruby dk.rb install -f

One line by one. 一行一行。 Finally try again 最后再试一次

bundle install

I was also facing this issue for past few hours. 在过去的几个小时中,我还面临着这个问题。
Then, I updated the Ruby version from Ruby2.2.6 to Ruby 2.3.3 and updated the devkit too. 然后,我将Ruby版本从Ruby2.2.6更新到了Ruby 2.3.3,还更新了devkit。
It worked! 有效! :-) :-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM