Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to install gems on OS X EL Capitan 10.14.1 #50

Open
stevelyc opened this issue Nov 8, 2018 · 1 comment
Open

Not able to install gems on OS X EL Capitan 10.14.1 #50

stevelyc opened this issue Nov 8, 2018 · 1 comment

Comments

@stevelyc
Copy link

stevelyc commented Nov 8, 2018

Building native extensions. This could take a while...
ERROR: Error installing cocoapods-acknowledgements:
ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0/ext/redcarpet

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181108-31503-or1xzs.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0/ext/redcarpet
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0/ext/redcarpet
make "DESTDIR="
make: *** No rule to make target /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by autolink.o'. Stop.

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/redcarpet-3.4.0/gem_make.out

@stevelyc stevelyc changed the title Not able to install gems on OS X EL Capitan 10.14 Not able to install gems on OS X EL Capitan 10.14.1 Nov 8, 2018
@winkelsdorf
Copy link
Contributor

Has to do with the restricted permissions on system folders. It is not suggested to install or update system gems, better use a ruby version manager like https://github.com/rbenv/rbenv.

If you're using homebrew you can install rbenv using:
brew install rbenv

Then add it to your bash profile (in my case zsh: ~/.zshrc):

# init rbenv
eval "$(rbenv init -)"

Use rbenv install and rbenv global to specify the ruby version you want to use then.

After this installation works fine for all gems like e.g. bundler, cocoapods or fastlane.

hth!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants