I tried to switch my ruby version from 1.8
(default) to 1.9.3
(latest on Pangolin) as per http://lenni.info/blog/2012/05/installing-ruby-1-9-3-on-ubuntu-12-04-precise-pengolin/. I'm doing this using apt
.
The other solutions to related questions on SO involve apt-get install ruby1.9.3-dev
but I definitely have it.
$ sudo gem install idn
Building native extensions. This could take a while...
ERROR: Error installing idn:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for main() in -lidn... yes
checking for idna.h... yes
checking for punycode.h... yes
checking for stringprep.h... yes
creating Makefile
make
compiling idn.c
compiling idna.c
idna.c: In function ‘toASCII’:
idna.c:88:37: error: ‘struct RString’ has no member named ‘ptr’
idna.c: In function ‘toUnicode’:
idna.c:128:41: error: ‘struct RString’ has no member named ‘ptr’
make: *** [idna.o] Error 1
Gem files will remain installed in /var/lib/gems/1.9.1/gems/idn-0.0.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/idn-0.0.2/ext/gem_make.out
I have also checked that I have gcc
installed and it's again installed from apt
.
$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]