0

我尝试按照文档安装 octopress,但在此过程中出现此错误。(之后'bundle install'

试图手动重新安装它,但没有成功。

Installing rdiscount (2.0.7.3) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/*****/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 
checking for random()... yes
checking for srandom()... yes
checking for rand()... yes
checking for srand()... yes
checking size of unsigned long... *** 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/*****/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
    --with-rdiscount-dir
    --without-rdiscount-dir
    --with-rdiscount-include
    --without-rdiscount-include=${rdiscount-dir}/include
    --with-rdiscount-lib
    --without-rdiscount-lib=${rdiscount-dir}/lib
/Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:597:in `Integer': can't convert nil into Integer (TypeError)
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:597:in `block in try_constant'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:330:in `popen'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:330:in `block in xpopen'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:323:in `xpopen'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:596:in `try_constant'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1156:in `block in check_sizeof'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
    from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1155:in `check_sizeof'
    from extconf.rb:11:in `block in sized_int'
    from extconf.rb:11:in `each'
    from extconf.rb:11:in `find'
    from extconf.rb:11:in `sized_int'
    from extconf.rb:15:in `<main>'


Gem files will remain installed in /Users/*****/.rvm/gems/ruby-1.9.3-p194/gems/rdiscount-2.0.7.3 for inspection.
Results logged to /Users/*****/.rvm/gems/ruby-1.9.3-p194/gems/rdiscount-2.0.7.3/ext/gem_make.out

An error occurred while installing rdiscount (2.0.7.3), and Bundler cannot continue.
Make sure that `gem install rdiscount -v '2.0.7.3'` succeeds before bundling.

我很确定这很容易,只是我现在太累了..如果我明白了,我会更新帖子,不会让任何人浪费时间。

  • 已安装 Mac Os X 山狮和 ruby​​ 1.9.3。
4

2 回答 2

0

很抱歉破坏了一个较旧的线程,但是我在带有 ruby​​ 2.0.0 和 rails 4 的 Windows 7 x64 上遇到了同样的问题。被难住了,尝试安装任何版本的 rdiscount 并且没有任何效果。发现是 Avast 阻止了某些东西在终端中运行。禁用它 10 分钟,它工作 100% 正常。

于 2013-12-09T03:46:53.523 回答
0

我无法rdiscount 2.0.7.3在 Mac 10.8.5 上安装ruby 1.9.2-p320-mri. 我能够安装rdiscount在 下ruby 2.0.0-p247,以防万一这对任何人都有帮助。

于 2013-11-12T09:32:55.437 回答