未能安装rdiscount-2.1.6

时间:2013-08-09 19:37:43

标签: ruby octopress rdiscount

我尝试按照文档安装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山狮和红宝石1.9.3。

2 个答案:

答案 0 :(得分:0)

我无法使用rdiscount 2.0.7.3在Mac 10.8.5上安装ruby 1.9.2-p320-mri。我能够在rdiscount下安装ruby 2.0.0-p247,以防任何人帮助。

答案 1 :(得分:0)

对不起来一个较旧的线程,但我在Windows 7 x64上使用ruby 2.0.0和rails 4遇到了同样的问题。难倒,尝试安装任何版本的rdiscount并没有任何效果。发现它是Avast阻止某些东西在终端中运行。禁用它10分钟,它工作100%罚款。