xcode-install undefined method ‘first' for nil:NilClass (NoMethodError)

Theodore Gonzalez
WanderCodes
Published in
1 min readSep 22, 2019

--

When downloading xcode 11 with xcode-install 2.6.1 or when running

xcversion update

we get this error

gems/xcode-install-2.6.1/lib/xcode/install.rb:447:in `prereleases’: undefined method `first’ for nil:NilClass (NoMethodError)

This is a known issue https://github.com/xcpretty/xcode-install/issues/348

While waiting for the fix, here’s the workaround

  1. Get the path of the failing file -> install.rb
  2. Open install.rb in your editor

3. Remove or comment out line 382.

4. Save and run xcversion again.

Enjoy using xcode 11!

--

--