Rails + Firebird 2.1.x


#1

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:insend’
/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:incheckout_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:inloop’
/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:insynchronize’
/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:inconnection’
/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:inretrieve_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:incache’
/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:insend’
/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:inprocess_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:inprocess’
/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:indispatch_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:insynchronize’
/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:indispatch_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:inhandle_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:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start' /usr/lib/ruby/1.8/webrick/server.rb:162:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:95:in start' /usr/lib/ruby/1.8/webrick/server.rb:92:ineach’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/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:indispatch’
/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:inrequire’
/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:innew_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:ingem_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.


#2

Fidel V. 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


#3

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.