Firebird News

Monday, May 19, 2014

Fire Ruby - howto start with Firebird and Ruby on Ubuntu / Debian

This howto is about installing firebird ruby driver on Ubuntu or any Debian based distro
you might need some firebird dependencies and if you need the stable Firebird server  Firebird 2.5 guide to install it

The very basic firebird package to build only the driver is firebird2.5-dev

sudo apt-get install firebird2.5-dev git-core
and choose yes when asked
Then you need to install ruby and the recommended rails way is to use rbenv 

rbenv install 2.1.2
rbenv global 2.1.2
ruby -v
Best way is to install it from gem

gem install fb

Alternate way  is to build install our gem (latest build-able is located here )

git clone https://github.com/rowland/fb.git
cd fb/
gem build fb.gemspec


You will get something like this in terminal :
 Successfully built RubyGem
  Name: fb
  Version: 0.*.*
  File: fb-0.*.*.gem


Now is time to install it using the gem command

gem install fb-0.*.*.gem



Please read the README.
here is how i tested on my machine

Here is part of the example i ran on my pc

pico test.rb 


And here are the results for my ruby test
ruby test.rb 
ID: 0, Name: John 0
ID: 9, Name: John 9

What is next class ? RoR on Firebird