# Installing .gem in an embedded system

**URL:** <https://www.ruby-forum.com/t/installing-gem-in-an-embedded-system/87263>\
**Category:** Ruby\
**Created:** [March 1, 2007, 10:06am UTC](https://www.ruby-forum.com/t/installing-gem-in-an-embedded-system/87263 "2007-03-01T10:06:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 1, 2007, 10:06am UTC](https://www.ruby-forum.com/t/installing-gem-in-an-embedded-system/87263/1 "2007-03-01T10:06:41Z")

</div>

Hi,  
I am trying to install sqlite3-ruby-1.1.0.gem on an embedded system  
(with  
ARM cpu).

From the target I use the command  
gem install sqlite3-ruby-1.1.0.gem  
but the installation fail, saying that sqlite3.h cannot be found.

This is the mkmf.log:

--------- mkmf.log -----------

have\_header: checking for sqlite3.h… -------------------- no

"arm-linux-gcc -E -I. -I/usr/local/lib/ruby/1.8/arm-linux -I.  
-I/include/  
-I/usr  
checked program was:  
/\* begin _/  
1: #include \<sqlite3.h\>  
/_ end \*/

* * *

It seems that the installation process wants a gcc compiler but on my  
target I have not a toolchain.

How can I install sqlite3-ruby gem on my target without compiling?

Thanks ad regards.  
Angelo Fontana

–

questo articolo e` stato inviato via web dal servizio gratuito  
[http://www.newsland.it/news](http://www.newsland.it/news) segnala gli abusi ad removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 1, 2007, 2:21pm UTC](https://www.ruby-forum.com/t/installing-gem-in-an-embedded-system/87263/2 "2007-03-01T14:21:27Z")

</div>

On 3/1/07, Angelo [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## --------- mkmf.log -----------
> 
> It seems that the installation process wants a gcc compiler but on my  
> target I have not a toolchain.
> 
> How can I install sqlite3-ruby gem on my target without compiling?

extract the sources, compile the extension where you have the  
toolchain, and then repack with binary extension (inspire yourself  
with -win32 gems – typically win32 has no toolchain installed as  
well)

I’ll leave the details up to you 😉

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [March 4, 2007, 3:11pm UTC](https://www.ruby-forum.com/t/installing-gem-in-an-embedded-system/87263/3 "2007-03-04T15:11:01Z")

</div>

Jan S. ha scritto:

> > * * *
> > 
> > It seems that the installation process wants a gcc compiler but on my  
> > target I have not a toolchain.
> > 
> > How can I install sqlite3-ruby gem on my target without compiling?

> extract the sources, compile the extension where you have the  
> toolchain, and then repack with binary extension (inspire yourself  
> with -win32 gems – typically win32 has no toolchain installed as  
> well)

> I’ll leave the details up to you 😉

I am not able to build a non-empty .gem, so I worked with .tar.gz  
package.  
I have crosscompiled the extension with the toolchain, I installed the  
package in /tmp/sqlite3-ruby (with the command: ruby setup.rb install  
–prefix=/tmp/sqlite3-ruby) and I copied /tmp/sqlite3-ruby on the  
target.  
Then I had to build an empty .gem, because sqlite3-ruby didn’t appear in  
the list of installed .gem on the target.  
After the installation of the empty .gem, the package worked properly.

Now I should learn how to build a non-empty .gem! 😉

Thanks you for your help!

Angelo.

–

questo articolo e` stato inviato via web dal servizio gratuito  
[http://www.newsland.it/news](http://www.newsland.it/news) segnala gli abusi ad removed\_email\_address@domain.invalid
