Can't install bigdecimal gem using urpmi or gem install

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Can't install bigdecimal gem using urpmi or gem install

Postby joeyc » Dec 24th, '12, 16:48

Not quite an adv topic but couldn't find a category that fits in basic support so here I am.

Am trying to install the bigdecimal gem for ruby. I have been able to install the sinatra gem via

Code: Select all
gem install sinatra


but when I try to do that with big decimal, i.e.

Code: Select all
gem install bigdecimal


I get

Code: Select all
ERROR:  Error installing bigdecimal:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h


When I try to install it via rpm via

Code: Select all
urpmi ruby-bigdecimal


I get

Code: Select all
No package named ruby-bigdecimal


Here are a list of my local gems
*** LOCAL GEMS ***

rack (1.4.1)
rack-protection (1.3.2)
sinatra (1.3.3)
sqlite3 (1.3.3)
tilt (1.3.3)

And my ruby versioning info
ruby 1.8.7 (2012-02-08 patchlevel 358) [i586-linux]

Thanks in advance! PLease let me know any further info you may need
joeyc
 
Posts: 55
Joined: Oct 22nd, '12, 05:44

Re: Can't install bigdecimal gem using urpmi or gem install

Postby isadora » Dec 24th, '12, 16:58

joeyc wrote:.........................
Code: Select all
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h


................


Guess, you are in need for ruby-devel?
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2763
Joined: Mar 25th, '11, 16:03
Location: Netherlands

Re: Can't install bigdecimal gem using urpmi or gem install

Postby joeyc » Dec 25th, '12, 10:28

Hi there

I did a

Code: Select all
urpmi ruby-devel


(I think, or a gem install ruby-devel - sorry, I did something then had a big christmas lunch) .

So now I get a different error message which probably means progress, right?

fatal error: ruby/ruby.h: No such file or directory


Not sure what to do here. Stack overflow articles say to install ruby-dev but that seems to be superseded by ice-ruby-devel and ruby-devel, both of which I have installed.

By the way I am using ruby 1.8.7 i586.

Not to go off track (but I don't think its worth opening another thread) is Mageia 2 incompatible with Ruby 1.9.3?

Please help me go forward :) and merry christmas
joeyc
 
Posts: 55
Joined: Oct 22nd, '12, 05:44

Re: Can't install bigdecimal gem using urpmi or gem install

Postby tom_ » Dec 27th, '12, 00:40

urpmf is the tool which searches a file for you in all the packages,

Code: Select all
urpmf -l ruby.h


tells that you need to install ruby-devel
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: Can't install bigdecimal gem using urpmi or gem install

Postby doktor5000 » Dec 27th, '12, 00:49

Best first do an
Code: Select all
rpm -qa | grep ruby | sort
to see what is installed currently. As i don't use ruby, not as packages nor as gems, i don't know how to list all installed gems.
Should probably be
Code: Select all
gem query --local
or as shortcut:
Code: Select all
gem q -L
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18017
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Can't install bigdecimal gem using urpmi or gem install

Postby joeyc » Dec 27th, '12, 10:20

Code: Select all
urpmf -l ruby.h


This prints a lot of output. Is there something in particular I should try and search for rather than spam you with irrelevant stuff?

Code: Select all
rpm -qa | grep ruby | sort

ice-ruby-3.3.1-5.mga2
ice-ruby-devel-3.3.1-5.mga2
ruby-1.8.7.p358-1.1.mga2
ruby-devel-1.8.7.p358-1.1.mga2
ruby-RubyGems-1.7.2-3.mga2
ruby-sqlite3-1.3.3-2.mga1
ruby-sqlite3-debug-1.3.3-2.mga1
ruby-sqlite3-doc-1.3.3-2.mga1


Code: Select all
gem query --local

*** LOCAL GEMS ***

diff-lcs (1.1.3)
rack (1.4.1)
rack-protection (1.3.2)
rspec (2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
rspec-mocks (2.12.1)
sinatra (1.3.3)
sqlite3 (1.3.3)
tilt (1.3.3)
[/reply]

Also, can someone please confirm that ruby 1.9.3 is NOT supported in Mageia 2?

As always, thanks for your help! :)
joeyc
 
Posts: 55
Joined: Oct 22nd, '12, 05:44

Re: Can't install bigdecimal gem using urpmi or gem install

Postby tom_ » Dec 27th, '12, 15:17

it seems taht you already have the rigth package (ruby-devel) installed,
so the problem is in another place

a couple of note:

- you have ruby 1.8.7, are you sure the bigdecimal version you are compiling is correct for that ruby version?

- it seems that ruby 1.8.7 has bigdecimal in its standardlib, are you sure you haven't it available already?

http://ruby-doc.org/stdlib-1.8.7/libdoc/bigdecimal/rdoc/BigDecimal.html
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest