gpt4 book ai didi

ruby - Bundler 吐出来自其他项目和 Gemfiles 的错误

转载 作者:太空宇宙 更新时间:2023-11-03 16:51:08 26 4
gpt4 key购买 nike

我正在使用 bundler 来处理多个项目的 gem。

  • bundler v 1.5.2
  • Mac 操作系统
  • rbenv 和 ruby​​ 2.0

当我出于某种原因运行 bundle install 时,它会从我之前运行过的其他 Gemfile 中吐出错误,但与我正在 bundle 的文件夹和 Gemfile 无关。

知道是什么原因造成的吗?

MacBook-Pro:test mylo$ bundle install 
Using mini_portile (0.5.2)
Using nokogiri (1.6.1)
Using rack (1.5.2)
Using rack-protection (1.5.2)
Using tilt (1.4.1)
Using sinatra (1.4.4)
Using bundler (1.5.2)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled
gem is installed. rbenv: version `.DS_Store' is not installed
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5./lib/bundler/resolver.rb:134:in
`block in resolve': Could not find gem 'dii_eris ( = 2.0.3) ruby',
which is required by gem 'dii_pluto ( = 0) ruby', in any of the
sources. (Bundler::VersionConflict) from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/safe_catch.rb:32:in
`catch' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5./lib/bundler/safe_catch.rb:32:in
`safe_catch' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5./lib/bundler/resolver.rb:132:in
`resolve' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/definition.rb:203:in
`resolve' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/definition.rb:133:in
`specs' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/environment.rb:22:in
`specs' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:115:in
`gemspecs' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:204:in
`block (3 levels) in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`block (2 levels) in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:186:in
`each' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:186:in
`block in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:462:in
`<main '
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:387:in
`rescue in eval_gemspec': There was a NameError while loading
codeproject.gemspec: (Bundler::GemspecError) uninitialized constant
Dii::Gemini from
/Users/mylo/gitcode/libs/codeproject/codeproject.gemspec:7:in `block
in <main ' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:376:in
`eval_gemspec' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:347:in
`block in load_gemspec_uncached' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/shared_helpers.rb:52:in
`chdir' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/shared_helpers.rb:52:in
`chdir' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:342:in
`load_gemspec_uncached' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler.rb:332:in
`load_gemspec' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/dsl.rb:51:in
`gemspec' from /Users/mylo/gitcode/libs/codeproject/Gemfile:4:in
`eval_gemfile' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/dsl.rb:30:in
`instance_eval' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/dsl.rb:30:in
`eval_gemfile' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/dsl.rb:9:in
`evaluate' from
/Users/mylo/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/bundler-1.5.2/lib/bundler/definition.rb:26:in
`build' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:95:in
`gemspecs' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:204:in
`block (3 levels) in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:203:in
`block (2 levels) in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:186:in
`each' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:186:in
`block in rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`open' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:185:in
`rehash' from
/Users/mylo/.rbenv/plugins/bundler/etc/rbenv.d/bundler/rehash.rb:462:in
`<main '

最佳答案

我有一种预感,它可能与 rbenv-bundler 有关,如 this issue 中所示.但是检查 gem list rbenv-bundler 并没有发现坏人。直到我尝试了 brew list | grep rbenv 如描述的那样 here .

我只是做了brew uninstall rbenv-bundler,上面描述的所有问题似乎都消失了!此外,您转储中的 rbenv: version `.DS_Store' is not installed 似乎已经消失了。

关于ruby - Bundler 吐出来自其他项目和 Gemfiles 的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21467278/

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