octopress / codefence

Write beautiful fenced code snippets with in any template.
MIT License
16 stars 16 forks source link

Incompatible with Octopress 2.0? #2

Closed kaushalmodi closed 10 years ago

kaushalmodi commented 10 years ago

Hi,

I am using Octopress 2.0. It looks like codefence is incompatible with that version?

I am getting this error on doing bundle

Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "jekyll":
  In Gemfile:
    octopress-codefence (>= 0) ruby depends on
      jekyll (>= 1.0.0) ruby
    jekyll (0.12.0)

What do I need to update to make codefence work? Thanks!

When I try to install the jekyll gem manually using gem install jekyll, I get this:

km²~/gems/:gems> gem install jekyll
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll:
        ERROR: Failed to build gem native extension.
    /home/kmodi/usr_local/bin/ruby extconf.rb
*** 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=/home/kmodi/usr_local/bin/ruby
        --with-ffi_c-dir
        --without-ffi_c-dir
        --with-ffi_c-include
        --without-ffi_c-include=${ffi_c-dir}/include
        --with-ffi_c-lib
        --without-ffi_c-lib=${ffi_c-dir}/lib
        --with-libffi-config
        --without-libffi-config
        --with-pkg-config
        --without-pkg-config
/home/kmodi/usr_local/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 /home/kmodi/usr_local/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
        from /home/kmodi/usr_local/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
        from /home/kmodi/usr_local/lib/ruby/2.1.0/mkmf.rb:642:in `block in try_ldflags'
        from /home/kmodi/usr_local/lib/ruby/2.1.0/mkmf.rb:635:in `with_ldflags'
        from /home/kmodi/usr_local/lib/ruby/2.1.0/mkmf.rb:641:in `try_ldflags'
        from /home/kmodi/usr_local/lib/ruby/2.1.0/mkmf.rb:1762:in `pkg_config'
        from extconf.rb:15:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /home/kmodi/gems/gems/ffi-1.9.3 for inspection.
Results logged to /home/kmodi/gems/extensions/x86_64-linux/2.1.0-static/ffi-1.9.3/gem_make.out

Looks like it has something to do with the libraries installed on my machine. These are the contents of mkmf.log in ffi-1.9.3

"gcc -o conftest -I/home/kmodi/usr_local/include/ruby-2.1.0/x86_64-linux -I/home/kmodi/usr_local/include/ruby-2.1.0/ruby/backward -I/home/kmodi/usr_local/include/ruby-2.1.0 -I.     -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration conftest.c  -L. -L/home/kmodi/usr_local/lib -Wl,-R/home/kmodi/usr_local/lib -L/home/kmodi/usr_local/lib -lffi     -Wl,-R -Wl,/home/kmodi/usr_local/lib -L/home/kmodi/usr_local/lib -lruby-static  -lpthread -lrt -lgmp -ldl -lcrypt -lm   -lc"
/usr/bin/ld: cannot find -lffi
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */
parkr commented 10 years ago

It's for 3.0, so it will be incompatible with 2.0.