You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
In the process of debugging the exception, below, I added some logging to rubygems/dependency.rb, which gave me the following, immediately prior to the exception:
I made the following change to bundler-1.0.15/lib/bundler/resolver.rb, which I believe fixes the problem:
$ diff -c .rvm/rubies/ruby-1.8.7-p334/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/resolver.rb{~,}
*** .rvm/rubies/ruby-1.8.7-p334/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/resolver.rb~ 2011-06-13 17:06:38.000000000 -0400
--- .rvm/rubies/ruby-1.8.7-p334/lib/ruby/gems/1.8/gems/bundler-1.0.15/lib/bundler/resolver.rb 2011-06-14 14:13:47.000000000 -0400
***************
*** 356,362 ****
def search(dep)
if base = @base[dep.name] and base.any?
! d = Gem::Dependency.new(base.first.name, *[dep.requirement.as_list, base.first.version].flatten)
else
d = dep.dep
end
--- 356,362 ----
def search(dep)
if base = @base[dep.name] and base.any?
! d = Gem::Dependency.new(base.first.name, *[dep.requirement.as_list, base.first.version].flatten.first)
else
d = dep.dep
end
The command you ran bundle exec rdebug /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/bin/spec spec/models/footage_handler2_spec.rb
Exception backtrace(s), if any
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/dependency.rb:52:in `initialize': Valid types are [:development, :runtime], not nil (ArgumentError)
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:359:in `new'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:359:in `search'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:354:in `gems_size'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:179:in `resolve'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/source_index.rb:95:in `sort_by'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:175:in `each'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:175:in `sort_by'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:175:in `resolve'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:160:in `start'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:128:in `resolve'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:127:in `catch'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/resolver.rb:127:in `resolve'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/definition.rb:151:in `resolve'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/definition.rb:90:in `specs'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/definition.rb:135:in `specs_for'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/definition.rb:124:in `requested_specs'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/environment.rb:23:in `requested_specs'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/runtime.rb:11:in `setup'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler.rb:107:in `setup'
from /Users/sidmaxwell/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/setup.rb:17
Thanks for the debugging output, it was pretty helpful. My alternate solution was to make the type argument explicit, and ensure that the Gem::Version is always cast to a string. Do you perhaps have a distilled reproduction case that I could use to create a test?
Thanks for the debugging output, it was pretty helpful. My alternate
solution was to make the type argument explicit, and ensure that the
Gem::Version is always cast to a string. Do you perhaps have a distilled
reproduction case that I could use to create a test?
Reply to this email directly or view it on GitHub: #1237 (comment)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the process of debugging the exception, below, I added some logging to rubygems/dependency.rb, which gave me the following, immediately prior to the exception:
I made the following change to bundler-1.0.15/lib/bundler/resolver.rb, which I believe fixes the problem:
The text was updated successfully, but these errors were encountered: