對於標題我很抱歉,因爲我真的不知道如何描述它。基本上,我有一套我建造的寶石,通常命名爲「mygems-gem1」,「mygems-gem2」等。無限加載寶石(需要子集)
我決定,如果我製作另一個寶石「mygems」這將需要所有的孩子寶石(即「mygems-gem1」等)。
我試過了,建立並安裝了寶石,並加載了IRB。但是,要求「mygems」現在只是永遠坐着,從不加載任何東西。看起來像一個依賴衝突,也許?
真奇怪的是,我可以加載IRB,並且需要手工製作兒童寶石,並且完美地工作。
什麼給?
編輯:讓它繼續運行,它永遠不會引發錯誤。我不知道這是任何幫助,但在CTRL +慶安出來,我得到這個堆棧跟蹤:
from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `call' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `block (2 levels) in contains_requirable_file?' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `each' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `any?' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:62:in `block in contains_requirable_file?' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:60:in `each' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:60:in `any?' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:60:in `contains_requirable_file?' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:951:in `block (2 levels) in find_in_unresolved_tree' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2397:in `[]' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2397:in `block (2 levels) in traverse' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2396:in `each' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2396:in `block in traverse' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2395:in `each' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2395:in `traverse' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:2398:in `block (2 levels) in traverse' ... 17 levels... from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:93:in `require' from /home/kinginky/.rvm/gems/ruby-2.1.2/gems/method_source-0.8.2/lib/method_source.rb:7:in `<top (required)>' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require' from /home/kinginky/.rvm/gems/ruby-2.1.2/gems/pry-0.10.1/lib/pry.rb:124:in `<top (required)>' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require' from /home/kinginky/.rvm/gems/ruby-2.1.2/gems/mygems-gem1-0.12.8/lib/mygems/gem1.rb:2:in `<top (required)>' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require' from /home/kinginky/.rvm/gems/ruby-2.1.2/gems/mygems-0.0.1/lib/mygems.rb:3:in `<top (required)>' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require' from /home/kinginky/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require' from (irb):1 from /home/kinginky/.rvm/rubies/ruby-2.1.2/bin/irb:11:in `<main>'
好的,這就是我之前做的。我想這樣做的原因是我將把所有的規格放在整個應用程序中,我需要包含所有的寶石。這在我的規範(很奇怪)中運行良好,這些規範在「mygems」gem中,但如果我嘗試在IRB或腳本中加載該gem,則會出現加載問題。 – 2014-10-30 21:13:13