I installed ruby 2.2.0 on Ubuntu 64-bit 14.04 to my home following https://railssavvy.wordpress.com/2012/06/02/install_ruby_and_rails/, and then installed a package called pdfbeads
. When I run the package, I have this error:
$ /home/t/.rvm/gems/ruby-2.2.0/wrappers/pdfbeads -o all.pdf
/home/t/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- iconv (LoadError)
from /home/t/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/t/.rvm/gems/ruby-2.2.0/gems/pdfbeads-1.1.1/bin/pdfbeads:35:in `<top (required)>'
from /home/t/.rvm/gems/ruby-2.2.0/bin/pdfbeads:23:in `load'
from /home/t/.rvm/gems/ruby-2.2.0/bin/pdfbeads:23:in `<main>'
from /home/t/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
from /home/t/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
To solve the problem, I followed this reply https://stackoverflow.com/a/19332909/156458,
$ which iconv
/usr/bin/iconv
$ iconv --version
iconv (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.
$ gem "iconv", "~> 1.0.3"
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command iconv,
So what happens to ruby and iconv? What shall I do now? Many thanks!
I have installed both 2.1.0 and 2.0.0 and pdfbeads
under them respectively. But when I run pdfbeads
located under their wrappers
directories, I still have the same error:
in `require': cannot load such file -- iconv (LoadError)