Ruby gem show "Invalid argument" error for almost every command

65 views
Skip to first unread message

Carlos Mermingas

unread,
Sep 29, 2016, 5:09:45 PM9/29/16
to rubygems.org

I am working through NativeScript's set-up on OS X El Capitan and I am stuck at the point where I am supposed to install xcodeproj and cocoapods. Almost everything that I try to do with gemshows the same error:

$ sudo gem install xcodeproj
ERROR:  While executing gem ... (Errno::EINVAL)
    Invalid argument

The following commands show the same error, wether I run it with sudo or not:

$ gem update --system
$ gem update
$ gem install whatever
$ gem install cocoapods

I have the following versions:

$ ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

$ gem --version
2.6.7

I've tried some of the help that I've found online, including reinstalling gem and ruby, restarting but nothing has helped.

I guess that I have a configuration problem with Ruby.

Any suggestions on how to troubleshoot this?

Philippe Lafoucrière

unread,
Sep 29, 2016, 7:53:19 PM9/29/16
to rubyge...@googlegroups.com
You should really try to avoid updating your system ruby.
If you want to try things, use a ruby installed by homebrew, or with rvm (or rbenv).
That will probably help :)

Reply all
Reply to author
Forward
0 new messages