参考的安装方法http://www.yangzhiping.com/tech/gollum.html
新建Gemfile文件,内容如下:
source "http://rubygems.org"
gem 'redcarpet'
gem "grit", '~> 2.5.0', git: 'https://github.com/gitlabhq/grit.git', ref: '42297cdcee16284d2e4eff23d41377f52fc28b9d'
gem 'gollum',git: 'https://github.com/gollum/gollum.git'
运行:
bundle install
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/alex/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for main() in -licui18n... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/alex/.rvm/rubies/ruby-2.1.1/bin/ruby
--with-icu-dir
--without-icu-dir
--with-icu-include
--without-icu-include=${icu-dir}/include
--with-icu-lib
--without-icu-lib=${icu-dir}/lib
--with-icui18nlib
--without-icui18nlib
/Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_library'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
from extconf.rb:27:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/alex/.rvm/gems/ruby-2.1.1/gems/charlock_holmes-0.6.9.4 for inspection.
Results logged to /Users/alex/.rvm/gems/ruby-2.1.1/extensions/x86_64-darwin-12/2.1.0-static/charlock_holmes-0.6.9.4/gem_make.out
An error occurred while installing charlock_holmes (0.6.9.4), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v '0.6.9.4'` succeeds before bundling.
运行 `gem install charlock_holmes -v '0.6.9.4'`
Building native extensions. This could take a while...
ERROR: Error installing charlock_holmes:
ERROR: Failed to build gem native extension.
/Users/alex/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb
checking for main() in -licui18n... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/alex/.rvm/rubies/ruby-2.1.1/bin/ruby
--with-icu-dir
--without-icu-dir
--with-icu-include
--without-icu-include=${icu-dir}/include
--with-icu-lib
--without-icu-lib=${icu-dir}/lib
--with-icui18nlib
--without-icui18nlib
/Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_library'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /Users/alex/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
from extconf.rb:27:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/alex/.rvm/gems/ruby-2.1.1/gems/charlock_holmes-0.6.9.4 for inspection.
Results logged to /Users/alex/.rvm/gems/ruby-2.1.1/extensions/x86_64-darwin-12/2.1.0-static/charlock_holmes-0.6.9.4/gem_make.out
环境是
rvm 1.25.22 (stable) by Wayne E. Seguin <
[email protected]>, Michal Papis <
[email protected]> [
https://rvm.io/]
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
gem -version 2.2.2
Bundler version 1.5.3
Rails 4.0.4