سؤال

I am trying to install Jekyll on my mac. My mac version is 10.9 and ruby version is 2.0.0. But when I used sudo gem install jekyll in my terminal, it went to mistake like this:

➜  ~  sudo gem install jekyll
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
    ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling porter.c
porter.c:359:27: warning: '&&' within '||' [-Wlogical-op-parentheses]
      if (a > 1 || a == 1 && !cvc(z, z->k - 1)) z->k--;
                ~~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~
porter.c:359:27: note: place parentheses around the '&&' expression to silence this warning
      if (a > 1 || a == 1 && !cvc(z, z->k - 1)) z->k--;
                          ^
                   (                          )
1 warning generated.
compiling porter_wrap.c
linking shared-object stemmer.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [stemmer.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/fast-stemmer-1.0.2/gem_make.out

I looked through here and tried many methods, but none of them work. How can I fix this?

هل كانت مفيدة؟

المحلول

It doesn't look like you have ruby installed / managed via rvm. I would definitely recommend rvm and homebrew on os x. They will save you a lot of headache.

Here is a good link on how to set that up:

http://dean.io/setting-up-a-ruby-on-rails-development-environment-on-mavericks/ https://deanpcmad.com/blog/setting-up-a-ruby-on-rails-development-environment-on-mavericks

نصائح أخرى

it works with ruby-2.1.1 so you have to

rvm use ruby-2.1.1

and

sudo gem install jekyll

P.S. if you don't have rvm - install it before :)

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB

\curl -sSL https://get.rvm.io | bash -s stable

You are using System ruby. Check out whether you have ruby install or not. For that you can use which ruby command and it will give some output likes

which ruby
/Users/amritdeepdhungana/.rvm/rubies/ruby-2.0.0-p353/bin/ruby

If you have not install it by following this guide. Or you can install it from rvm site.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top