Forum: Ruby on Rails Rails + Firebird 2.1.x

C7141d4b9bd6ac1f4fb94220fcdd892c?d=identicon&s=25 Fidel Viegas (Guest)
on 2009-03-15 22:38
(Received via mailing list)
Hi all,

I have played with JRuby on Rails in the past and managed to make it
work with Firebird. Although migrations did not work, I managed to do
everything manually and it worked. Now, I am working with Ruby on
Rails and was wondering if anyone here has managed to get Rails to
work with Firebird 2.1.x.

If yes, what were the steps? I installed fb and fb_adapter, and I get
the following error: No Firebird connections established. And here is
the stack trace:

-------------------------- begin stack trace
-----------------------------------------
/usr/lib/ruby/gems/1.8/gems/fb_adapter-0.5.8/lib/active_record/connection_adapters/fb_adapter.rb:22:in
`fb_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in
`send'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in
`new_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in
`checkout_new_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in
`checkout'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`loop'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`checkout'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in
`checkout'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in
`connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in
`retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in
`retrieve_connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:113:in
`connection'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in
`cache'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in
`perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in
`send'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in
`process_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in
`process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in
`process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in
`process'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in
`handle_request'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in
`dispatch_unlocked'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in
`synchronize'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in
`dispatch_cgi'
/usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:103:in
`handle_dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:74:in
`service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in
`dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick.rb:66
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`require'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in
`new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in
`require'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
script/server:3
------------------------------------- end stack trace
------------------------------

Can someone help me out here?

Thanks in advance.

Fidel.
2b04479fb847d7177977ac759769ce34?d=identicon&s=25 George Georgiev (georgiev)
on 2010-08-12 19:24
Fidel Viegas wrote:
> Hi all,
>
> I have played with JRuby on Rails in the past and managed to make it
> work with Firebird. Although migrations did not work, I managed to do
> everything manually and it worked. Now, I am working with Ruby on
> Rails and was wondering if anyone here has managed to get Rails to
> work with Firebird 2.1.x.
>
> If yes, what were the steps? I installed fb and fb_adapter, and I get
> the following error: No Firebird connections established. And here is
> the stack trace:
>
> -------------------------- begin stack trace
> ------------------------------------- end stack trace
> ------------------------------
>
> Can someone help me out here?
>
> Thanks in advance.
>
> Fidel.

I'm replaying in case some one googles this.
I'm maintaining a new project called rubyfb based on the FireRuby
bundled with activerecord adapter. I'm using it flawlessly in production
environment (activerecord-2.3.5 and Firebird-2.1.3). If someone is
interested the project page is http://rubyforge.org/projects/rubyfb/

George
C7141d4b9bd6ac1f4fb94220fcdd892c?d=identicon&s=25 Fidel Viegas (Guest)
on 2010-08-12 22:33
(Received via mailing list)
Hi George,

Thanks for letting us know. But, you should have a look at Rowland's
adapter/driver pair. Here are the links:

1) http://github.com/rowland/fb_adapter
2) http://github.com/rowland/fb

I have tried it with Firebird 1.5 up to Firebird 2.5. It was pretty
well, but there is no support for migrations. I had managed to add
support for migration to this adapter, but have lost the files when I
re-installed the system and forgot to backup. I now use postgres and
mysql, but have firebird setup for some projects I have done in the
past.

I will give your adapter a try.

All the best,

Fidel.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.