Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

No firebird connection established #1

Closed
vikrammishra333 opened this Issue June 27, 2012 · 3 comments

2 participants

vikrammishra333 Brent Rowland
vikrammishra333

I am using the gem 'activerecord-fb-adapter' and gem 'fb' both version 0.7.0 with my rails(3.2.6) application. But I am not able to connect to the database.

Running rake db:create gives

{:adapter=>"fb",
:database=>"localhost/3050:/var/lib/firebird/2.5/data/rubyonfire.fdb",
:username=>"sysdba",
:password=>"mindfire",
:host=>"localhost",
:downcase_names=>true}
{:adapter=>"fb",
:database=>"localhost/3050:/var/lib/firebird/2.5/data/rubyonfire_test.fdb",
:username=>"sysdba",
:password=>"mindfire",
:host=>"localhost",
:downcase_names=>true}

and rake db:migrate gives
{:adapter=>"fb",
:database=>"localhost/3050:/var/lib/firebird/2.5/data/rubyonfire.fdb",
:username=>"sysdba",
:password=>"mindfire",
:host=>"localhost",
:downcase_names=>true}
rake aborted!
No Firebird connections established.

Tasks: TOP => db:migrate
(See full trace by running task with --trace)

Please help.

Brent Rowland
Owner

Try adding "create: true" under your profile in database.yml.

There's probably a better way to handle this.

vikrammishra333

Thanks @rowland , It works perfectly fine in connecting and creating the database.

But, rake db:migrate throws an error saying that

rake aborted!
undefined method `execute' for #ActiveRecord::ConnectionAdapters::FbAdapter:0x9cbf47c

Tasks: TOP => db:migrate
(See full trace by running task with --trace)

when i explored fb_adapter.rb, I see that definition for execute method is commented out, like given below.

def execute(sql, name = nil, skip_logging = false)
  #   translate(sql) do |sql, args|
  #     if (name == :skip_logging) or skip_logging
  #       @connection.execute(sql, *args)
  #     else
  #       log(sql, args, name) do
  #         @connection.execute(sql, *args)
  #       end
  #     end
  #   end
  # end

When i uncommented it, migration rake db:migrate worked(although, complaining about fixnum).

I want to ask that do i really need to uncomment it or there is any other solution.

And yes, If i need to uncomment it, why it is commented out??

Brent Rowland
Owner

I thought it was deprecated, but perhaps I was mistaken. It's back in in version 0.7.2.

Brent Rowland rowland closed this October 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.