Subject Re: Firebird and Ruby on Rails
Author floater_llerrac
--- In firebird-tools@yahoogroups.com, "marius popa" <mapopa@...> wrote:
>
> On Mon, Sep 8, 2008 at 7:39 PM, Zedalaye <zedalaye@...> wrote:
>
> > Hi
> >
> > >While there's a good ruby firebird lib around -- FireRuby has been around
> > >being updated (thanks to great work from Scott Knight, and others) -- it
> > >seems there's no maintained ActiveRecord-
> > >Firebird-Adapter.
> >
> > >Does any one knows any project on maintaining an
> > >ActiveRecord-Firebird-Adapter?
> >
> > The best, for me, for now, is fblib/fb_adapter from Brent Rowland. It is
> > now hosted on GitHub (http://github.com/rowland/fb and
> > http://github.com/rowland/fb_lib), I forked these to my own profile :
> > http://github.com/zedalaye/fb and http://github.com/zedalaye/fb_lib
> > because fb_adapter don't support ActiveRecord Migrations and I plan to
> > rewrite fblib to use the wire protocol in plain Ruby so I will not
> > depend on the fbclient library (as Jaybird and DotNetProvider do to
> > avoid non managed code.) This will also help porting fblib/fb_adapter to
> > rubinius.
> >
> > I don't know when I will be ready to commit something nor when I will be
> > ready to ship something. But if you (or others) are interested, you're
> > welcome ;-)
> >
> > Regards,
> >
> > --
> > Pierre Yager
> >
> >
> >
>
>
> That is an good news , a good start would be some pointers for beginners and
> testers , or some notes in your blog
> Also i absolutely love the git/github interface , i love the fact that i can
> edit sometime directly the file from the web interface also git is very
> powerful tool , light years from svn/cvs
>
> If you start to use the wire protocol directly i think is good to start some
> documentation about it
> so other languages could implement it (php/perl/oopascal/perl6 or
> javascript)
>
> On my to do list is to learn someday ruby and python , from what i have read
> and tested i love it's syntax
> --
> developer flamerobin.org
>
>
> [Non-text portions of this message have been removed]
>

strangely, i tried using the existing adapter today. to only find it had not implemented all i
need, and as you say appears unmaintained. rake db:migrate leads to an exception -
select_rows is an abstract method

my set up:
gem install activerecord-firebird-adapter -s http://gems.rubyonrails.org
this provides -activerecord-firebird-adapter (1.0.0.9250)
i use:
rails 2.1
fireruby - 0.4.3

this adapter i think is based on:
http://dev.rubyonrails.com/svn/rails/adapters/firebird/lib/active_record/
connection_adapters/firebird_adapter.rb
--this does not have the method 'select_rows'. So that was that.

One thing also, I do not believe it supports UTF8 - well the rails schema takes up too
much space(UNIQUE_SCHEMA_MIGRATIONS is too long I think) but i admit not
checking to see if firebird allows extra bytes in naming when UTF8. it does not in 1.5x

I am tempted to fill in the missing bits of this existing adapter, as I find them as I would like
to use rails for a new system but access an existing firebird db.

cheers

alexc