Ruby Rails and Sqlite

2012 April 18 at 03:32 » Tagged as :ruby, ror, sqlite, swap,

When trying to create my first rails app, well it's not my first rails app, I am just trying out the examples in the Ruby on Rails Tutorial Book. this is what I got:

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.5 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-1.3.5/ext/sqlite3/gem_make.out An error occured while installing sqlite3 (1.3.5), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.3.5'` succeeds before bundling.

Well at least the error message is kind enough to tell me how to try to fix it,  (install sqlite3 -v '1.3.5')  too bad it doesn't work

Building native extensions. This could take a while... ....... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb checking for sqlite3.h... no sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite-devel' and check your shared library search path (the location where your sqlite3 shared library is located).

  Since the problems are caused by a missing header file, I guessed the yum install sqlite-devel command would solve it and yes, it did. But later on when trying to start the rails server came across another issue which is considerably more difficult to solve than this one and needs it's own post.