Ruby on openSUSE 12.2: how install the mechanize gem?

(I’m sudo as root on openSUSE 12.2)

I want to experiment with ruby, especially the mechanizer gem: mechanize-2.7.0 Documentation

So I have run zypper commands to install ruby, rub-devel, gcc, gcc-++ and their dependencies:

zypper install rubyzypper install ruby-devel
zypper install gcc
zypper install gcc-++

But installing meganizer through gem keeps failing:

snip:~ #gem install mechanizeBuilding native extensions.  This could take a while...
ERROR:  Error installing mechanize:
    ERROR: Failed to build gem native extension.


        /usr/bin/ruby1.9 extconf.rb
checking for main() in -lstdc++... no
checking for ruby/encoding.h... yes
creating Makefile


make
compiling unf.cc
make: g++: Command not found
make: *** [unf.o] Error 127




Gem files will remain installed in /usr/lib64/ruby/gems/1.9.1/gems/unf_ext-0.0.6 for inspection.
Results logged to /usr/lib64/ruby/gems/1.9.1/gems/unf_ext-0.0.6/ext/unf_ext/gem_make.out

Apparently, something needs to provide g++, but I could not find a package that does.

I’m probably missing something obvious.
Any idea what?

–jeroen

On 2013-09-08 23:26, jpluimers wrote:
> Apparently, something needs to provide g++, but I could not find a
> package that does.

gcc-c+±4.7-7.1.1.x86_64


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Thanks: made typo the first time gcc-++ and should have typed gcc-c++. The first does not work, the second does.

–jeroen