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:
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:
During the latter command, however, I got stuck:
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.
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
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.