Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No firebird connection established #1

Closed
vikrammishra333 opened this issue Jun 27, 2012 · 3 comments
Closed

No firebird connection established #1

vikrammishra333 opened this issue Jun 27, 2012 · 3 comments

Comments

@vikrammishra333
Copy link

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.

@rowland
Copy link
Owner

rowland commented Jun 27, 2012

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

There's probably a better way to handle this.

@vikrammishra333
Copy link
Author

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??

@rowland
Copy link
Owner

rowland commented Sep 21, 2012

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

@rowland rowland closed this as completed Oct 19, 2012
rowland pushed a commit that referenced this issue Feb 13, 2015
Dont encode short strings w/ nil column in #quote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants