mneumann / postgres-pr

A pure-Ruby (pr) library for accessing PostgreSQL databases
http://rubyforge.org/projects/postgres-pr
43 stars 13 forks source link

Rails 2.3.3 #1

Closed alkesh closed 14 years ago

alkesh commented 14 years ago

postgres-pr doesn't seem to work with rails 2.3.3. It raises the error: "undefined method `quote_ident' for PGconn:Class". Probably due to this commit in rails: http://github.com/rails/rails/commit/60601234708b34c81dcd6a58a0cad79a7520ce10

euphemizm commented 14 years ago

PGconn.quote_ident method is now used for quote_column_name method in ConnectionAdapters::PostgreSQLAdapter, but is not implemented in postgres-pr drivers! Just add to your code (e.g. in config/initializers/new_rails_defaults.rb):

TEMP!? fixes rails 2.3.3 problems with postgres-pr driver...

class PGconn def PGconn.quote_ident(name) %("#{name}") end end

dgoldie commented 14 years ago

My system is ignoring this fix. Win XP, gem is postgres-pr 0.6.1

In the Rails console, it does look like the class is being updated.

dgoldie commented 14 years ago

think I fixed it. I was running a rake task, so the initializers weren't being run. right? this seems to have worked: rake db:create:all -P development

ahamid commented 14 years ago

any updates on this? initializers appear not to be running in rake tasks so it seems like i'll have to fork

mneumann commented 14 years ago

Fixed in 0.6.3

OneHQ commented 14 years ago

can you bump the gem version then?

lucasmncastro commented 14 years ago

@mneumann publish the gem 0.6.3, please!

mneumann commented 14 years ago

It should be there since 15th Dec 2009, at least on rubyforge. But for some unknown reason (the same happens to version 0.6.2 btw) it is not recognized by "gem". I'll try to upload it again to rubyforge to see if this fixes the problem.

lucasmncastro commented 14 years ago

Migrate to Gemcutter: http://gems.rubyforge.org/pages/migrate

euphemizm commented 14 years ago

yes, with the standard http://gems.rubyforge.org/ source latest gem for postgres-pr is only '0.6.1' !

lucasmncastro commented 14 years ago

@mneumann if the auto-publishing is not working, try to publish by hand with "gem push postgres-pr-0.6.3.gem".

mneumann commented 14 years ago

thanks guys! I uploaded the 0.6.3 gem to gemcutter and it seems to work now.

lucasmncastro commented 14 years ago

thanks :)

rafa1970 commented 14 years ago

you have to run: gem install pg