Grib_api.h could not be found while installing grib api

HI there , I am trying to install a ruby gem called rb-grib but I am constantly having issues while doing so.

I am using Ubuntu 15.04

So I went to this page http://www.rubydoc.info/gems/rb-grib/0.2.2

I tried to install requirements for this gem which are

In order to install grib_api I followed every instructions I can find on web but when it comes to final step in installation (sudo make install) , it gives me an error

“checking for grib_api.h … no”

“Could not create makefile due to some reason”

I have followed this guide to install grib api Guide

Snapshot of the error I am having in the final command for the api(from the guide link) (make install)

I am really look forward to have some help in installing the rb-grib gem.

Many thanks

Yash

sudo apt-get install ruby-grib
might be what you want. The description is "Ruby interface to the ECMWF
GRIB API
It is always worth using synaptic to search the repositories before trying
to install by hand.

Colin

Hey mate thanks for heads up, your suggestion worked in installing the gem. But how can I use this gem now, like if I follow this example , it gives me no such file can not be loaded ‘numru/grib’. So is there any other docs which should I follow to use this gem ?

I really appreciate your help.

Thanks

Yash

Hey mate thanks for heads up, your suggestion worked in installing the gem.
But how can I use this gem now, like if I follow this example , it gives me
no such file can not be loaded 'numru/grib'. So is there any other docs
which should I follow to use this gem ?

I have no idea, I have not heard of it before you asked, I just
googled a bit to come up with my previous suggestion. However if you
tell us more someone may be able to help. Post the source file around
the area giving the error and post the full error message and tell us
which line it is failing on.

Colin

On second thoughts I assume you are getting the error on the line
require 'numru/grib'. Is this in a Ruby on Rails app or in a straight
ruby script?

Colin

Either way , I can not use this gem in the ruby script or rails app. I have been trying to fix but could not find any single guide to do so. The documentation on the gem page is very helpless.

Thanks

Yash

Either way , I can not use this gem in the ruby script or rails app. I have been trying to fix but could not find any single guide to do so. The documentation on the gem page is very helpless.

In a rails app you do not need the require statement. Take that out and if you get an error when you try to use it post the error and a section of code and also Gemfile.lock

Colin