Code Monkey home page Code Monkey logo

Comments (10)

randym avatar randym commented on September 7, 2024

@mazhout

Let's start here:

http://stackoverflow.com/questions/3553415/jmagick-error-when-trying-to-load-a-file-unsatisfiedlink

from axlsx.

daveed avatar daveed commented on September 7, 2024

@randym

I am still stuck, don't really know what I can try next.

from axlsx.

randym avatar randym commented on September 7, 2024

For now, why dont we turn autowidth off

p = Axlsx::Package.new
p.use_autowidth = false

You can specify the widths you want to use for columns with Worksheet#column_widths
That will stop the require, which will hide the linking error so you can get started making your report.

In the mean time, lets have a look at irb..
What happens when you call:

require 'rmagick'

in irb ?

from axlsx.

daveed avatar daveed commented on September 7, 2024

Thanks for the advice for autowidth. That will do for now ;)

require 'RMagick' in irb returns true. I think my Ruby installation is fine.
But if I use jirb and require 'RMagick' I have the same error again:

mazhout:~/ $ irb
>> require 'RMagick'
=> true

mazhout:~/ $ irb -r rubygems -r RMagick
>> puts Magick::Long_version
This is RMagick 2.13.1 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. Hunter
Built with ImageMagick 6.6.2-6 2010-12-02 Q16 http://www.imagemagick.org
Built for ruby 1.8.7
Web page: http://rmagick.rubyforge.org
Email: [email protected]
=> nil

mazhout:~/ $ jirb
irb(main):001:0> require 'RMagick'
LoadError: load error: RMagick2 -- java.lang.UnsatisfiedLinkError: /usr/lib/jruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.so: undefined symbol: rb_frame_last_func
from org/jruby/RubyKernel.java:1033:in `require'
from /usr/lib/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:11:in `(root)'
from org/jruby/RubyKernel.java:1033:in `require'
from /usr/lib/jruby/lib/ruby/gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:59:in `require'
from (irb):1:in `evaluate'
from org/jruby/RubyKernel.java:1083:in `eval'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:158:in `eval_input'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:271:in `signal_status'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:155:in `eval_input'
from org/jruby/RubyKernel.java:1410:in `loop'
from org/jruby/RubyKernel.java:1183:in `catch'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:154:in `eval_input'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:71:in `start'
from org/jruby/RubyKernel.java:1183:in `catch'
from /usr/lib/jruby/lib/ruby/1.8/irb.rb:70:in `start'
from /usr/lib/jruby/bin/jirb:13:in `(root)'irb(main):002:0>

from axlsx.

randym avatar randym commented on September 7, 2024

Can I ask you to please ping the guys at RMagick on this?

I am pretty sure this is an issue in your environment. Namely RMagick2.so is not finding some headers. However, I am far from an expert on all things JRuby. I would expect there should be some way to specify either during the install, or via some environment variable where those headers live.

Suffering a bit of a WOML here (works on my local) but my env is going to be a bit different from your setup.
Darwin xxx-pro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

from axlsx.

daveed avatar daveed commented on September 7, 2024

Sure no problem.
I just opened an issue on rmagick/rmagick#52

from axlsx.

randym avatar randym commented on September 7, 2024

@mazhout

Good news for you mate! I have removed the dependency on RMagick from the gem. Can you link to master until I release 1.1.1 (probably next week, depends on how busy work stays)

from axlsx.

daveed avatar daveed commented on September 7, 2024

Good job! I check out what you removed in the code.
I can now remove autowidth false and pull master :)

Thanks!

from axlsx.

randym avatar randym commented on September 7, 2024

1.1.1 is released. Closing this one - and I never have to fight with RMagick again ;)

from axlsx.

daveed avatar daveed commented on September 7, 2024

cheers!

from axlsx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.