xcode-install
xcode-install copied to clipboard
`xcversion update`: NoMethodError: undefined method `first' for nil:NilClass
Possibly due to Xcode 11 coming out of beta?
⯠bundle exec xcversion update
Available session is not valid any more. Continuing with normal login.
bundler: failed to load command: xcversion (/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/bin/xcversion)
NoMethodError: undefined method `first' for nil:NilClass
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/xcode-install-2.6.1/lib/xcode/install.rb:447:in `prereleases'
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/xcode-install-2.6.1/lib/xcode/install.rb:382:in `fetch_seedlist'
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/xcode-install-2.6.1/lib/xcode/install.rb:201:in `seedlist'
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/xcode-install-2.6.1/lib/xcode/install.rb:416:in `list_versions'
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/xcode-install-2.6.1/lib/xcode/install.rb:307:in `list'
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/xcode-install-2.6.1/lib/xcode/install/update.rb:10:in `run'
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/xcode-install-2.6.1/bin/xcversion:12:in `<top (required)>'
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/bin/xcversion:23:in `load'
/Users/ben/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/bin/xcversion:23:in `<top (required)>'
⯠bundle exec xcversion --version
2.6.1
⯠rbenv version
2.6.3 (set by /Users/ben/src/MyProject/.ruby-version)
@commscheck
While waiting for the fix, you can hotfix it locally:
Navigate to
āØUsersā©/<USERNAME>/rbenvā©/versionsā©/<VERSION>/libā©/rubyā©/gemsā©/<VERSION>/gemsā©/xcode-install-<VERSION>/libā©/xcodeā©/install.rb and comment line 382 that calls prereleases function.
Apparently this line in Apples seedlist response is interpreted as a release:
<p>Installation requires macOS 10.15 beta or Xcode 11 GM seed.</p>
Happens here.
Thanks @eugene-krinitsyn!
This works for (chruby/ rvm/ rbenv / any ruby version manager)
When you call
xcversion update
- Get the path of the failing file -> install.rb
- Open it in your editor
- Comment line 382
source https://stackoverflow.com/a/58046738/3040446
@eugene-krinitsyn Thanks! It worked for me.
@eugene-krinitsyn
Thanks!
Just a note, I'm using rvm and found mine in /Users/<USERNAME>/.rvm/gems/ruby-<RUBY-VERSION>/gems/xcode-install-<XCODE-INSTALL-VERSION>/lib/xcode/install.rb
@eugene-krinitsyn Thanks, it worked
Is there a sample of the entry (or web response) that gets parsed wrongly? I'd love to help fix this.
@eugene-krinitsyn You're the best!

