rubygemsrvmxcodeproj

Can Not Update Xcodeproj Gem


I am trying to update the xcodeproj gem to the latest version.

Currently, I have version 1.5.6:

$xcodeproj --version
1.5.6

$ which xcodeproj
/Users/nicolasmiari/.rvm/gems/ruby-2.4.0/bin/xcodeproj

I tried to update using:

$ gem install xcodeproj
Successfully installed xcodeproj-1.7.0
Parsing documentation for xcodeproj-1.7.0
Done installing documentation for xcodeproj after 1 seconds
1 gem installed

...which seems to succeed, but xcodeproj --version keeps returning 1.5.6.

I'm not versed at all on Ruby or rvm, and honestly I can't dig into this right now. I just need to update an Xcode project that (unfortunately) uses Cocoapods.

What am I missing?


Addendum: If I run:

$ gem list

...I get (among other things):

xcodeproj (1.7.0, 1.5.6)

So both versions are installed. I guess I need to get rid of the older one...


Solution

  • Okay, so following to this answer, I ran:

    $ gem cleanup xcodeproj
    

    ... and now $ gem list returns:

    xcodeproj (1.7.0)
    

    ...but $ xcodeproj --version still reported 1.5.6.

    I restarted the terminal, and now it reports the latest version.