ging / avatars_for_rails

A Rails gem to manage avatars
MIT License
45 stars 27 forks source link

support for rmagick4j #10

Closed francescoagati closed 13 years ago

francescoagati commented 13 years ago

with jruby this gem is not bundle

you should check for http://code.google.com/p/rmagick4j/

require 'rubygems' gem PLATFORM == 'java' ? 'rmagick4j' : 'rmagick' require 'RMagick'

give this error

Installing rmagick (2.13.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/Francesco/.rvm/rubies/jruby-1.6.5/bin/jruby extconf.rb 

WARNING: JRuby does not support native extensions or the `mkmf' library very well. Check http://kenai.com/projects/jruby/pages/Home for alternatives. checking for Ruby version >= 1.8.5... yes checking for cc... yes checking for Magick-config... yes checking for ImageMagick version >= 6.4.9... yes checking for HDRI disabled version of ImageMagick... yes checking for stdint.h... yes checking for sys/types.h... yes checking for wand/MagickWand.h... yes checking for InitializeMagick() in -lMagickCore... no checking for InitializeMagick() in -lMagick... no checking for InitializeMagick() in -lMagick++... no Can't install RMagick 2.13.1. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.

* 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/Francesco/.rvm/rubies/jruby-1.6.5/bin/jruby --with-MagickCorelib --without-MagickCorelib --with-Magicklib --without-Magicklib --with-Magick++lib --without-Magick++lib

Gem files will remain installed in /Users/Francesco/.bundler/tmp/50974/gems/rmagick-2.13.1 for inspection. Results logged to /Users/Francesco/.bundler/tmp/50974/gems/rmagick-2.13.1/ext/RMagick/gem_make.out

atd commented 13 years ago

Hi Francesco, it seems that the ImageMagick library is missing:

Can't install RMagick 2.13.1. Can't find the ImageMagick library or one of the dependent libraries. Check the mkmf.log file for more detailed information.

See: http://www.imagemagick.org/script/binary-releases.php

francescoagati commented 13 years ago

i try to make run social-stream on jruby, and on jruby should not be reference to binary c extension. I think that the use of rmagick4j should resolve this problem

atd commented 13 years ago

Ok, I understand now.

Please, try version 0.2.1 and tell me if it works for you

francescoagati commented 13 years ago

it try to load native rmagick. I will try to fork this repository and make some test with jruby if for you is good this solution

atd commented 13 years ago

Sure! We are happy to receive patches that improve Social Stream and its related gems.

francescoagati commented 13 years ago

I have make a mistake. using this repository in github with bundle it work correctly loading rmagick4j.

Thanks