Ruby on Rails on the Nokia N810 – sqlite lib needed

I’m currently playing with Ruby on Rails, just for my very own pleasure and joy. Admittedly, that’s only one half of the truth. Some ruby (respectively rails) knowledge will also help me during my “daytime job”. What I’d like to do for now is to develop some rails application for the Nokia N810.

Ruby 1.8 itself can easily get installed on the device via apt-get install ruby (you will need root privileges to do so). To install rails, however, you will need Ruby Gems, a tool to install and manage ruby programs and libraries, circumventing the package manager of the Maemo operating system.

I downloaded and installed it on the tablet using the following commands:
cd rubygems-1.3.5
ruby setup.rb --no-ri --no-rdoc

The installation includes some stuff in /usr/lib/ruby. You can now use gem to install rails. Note that the binary is called gem1.8:
gem1.8 install rails

I’m reading the (german language) book »Rapid Web Development mit Ruby on Rails« by Ralf Wirdemann and Thomas Baustert. To generate the skeleton of their first example application, I ran the following commands:
cd /media/mmc1/
rails ontrack
cd ontrack
rake db:create

During the latter command, however, I got stuck:
(in /media/mmc1/ontrack)
rake aborted!
no such file to load -- sqlite3
(See full trace by running task with --trace)

I tried to solve this issue by installing sqlite-ruby:
gem1.8 install sqlite-ruby
This gave me another error:
ERROR: Error installing sqlite-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1

Maybe it tries to compile some binary module, but the tablet provides neither a development environment nor a compiler. Some web search didn’t bring up many hits, and none of them led me somewhere useful. If you can share a hint, please let me know.
I’ll investigate the issue further tomorrow. Time to go to bed :) .


Thanks to the hint of Adam, I checked whether libsqlite3-0 is installed. Actually, it is. Jakob Skjerning recommends to install the Ruby dev packages:
apt-get install ruby1.8-dev
This however fails as well. It depends on libc6-dev which is not available for the tablet.

OK, tricked then. I’ll give up for now and focus on Rails on my Desktop machine.

2 thoughts on “Ruby on Rails on the Nokia N810 – sqlite lib needed

  1. Adam

    Hi. My guess is you need to install sqlite (not the ruby gem) on your machine first. I don’t have an Ubuntu machine handy, but it is probably something like this:

    sudo apt-get install sqlite3

    Also, you might have better luck installing the sqlite3 gem (notice the “3”):

    gem1.8 install sqlite3-ruby

    But that’s not why I’m here…looking for your midi sysex utility…

Comments are closed.