Answer the question
In order to leave comments, you need to log in
Can't compile tkImg from Tk package for Ruby on Ubuntu 14.04?
And now in more detail. I needed a Tk toolkit for Ruby.
I installed it via sudo apt-get install libtcltk-ruby
.
At first everything worked, but when it was necessary to use it, it require "tkextlib/tkimg/jpeg"
gives errors:
/usr/lib/ruby/1.9.1/tk/package.rb:86:in `rescue in require': TkPackage can't find package img::jpeg (RuntimeError)
from /usr/lib/ruby/1.9.1/tk/package.rb:83:in `require'
from /usr/lib/ruby/1.9.1/tkextlib/tkimg/jpeg.rb:14:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/xo8bit/RubymineProjects/test/my_test.rb:4:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
./configure
./make
irb(main):002:0> require "tkextlib/tkimg/jpeg"
RuntimeError: TkPackage can't find package img::jpeg
from /usr/lib/ruby/1.9.1/tk/package.rb:86:in `rescue in require'
from /usr/lib/ruby/1.9.1/tk/package.rb:83:in `require'
from /usr/lib/ruby/1.9.1/tkextlib/tkimg/jpeg.rb:14:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from (irb):2
from /usr/bin/irb:12:in `<main>'
Answer the question
In order to leave comments, you need to log in
libjpeg-dev installed, libjpeg not found. The error is still here:
/usr/lib/ruby/1.9.1/tk/package.rb:86:in `rescue in require': TkPackage can't find package img::jpeg (RuntimeError)
from /usr/lib/ruby/1.9.1/tk/package.rb:83:in `require'
from /usr/lib/ruby/1.9.1/tkextlib/tkimg/jpeg.rb:14:in `<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /home/xo8bit/RubymineProjects/test/my_test.rb:4:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
See a similar problem here: https://www.ruby-forum.com/topic/4414548
As far as I could understand, the problem is that extensions from tkextlib/
must be installed separately, or that the standard delivery of extensions from tcl is incomplete and it overwrites the one that is placed through the gem. You can check support with the command
ruby C:/Ruby193/lib/ruby/1.9.1/tkextlib/pkg_checker.rb
(substitute the desired path to your version of ruby) Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question