using
mri ruby 1.8.6 in netbeans 6.0
postgres 8.2 server
postgres-pr 0.4.0 (the only gem I can get to work in Vista)
vista business
fails on "DB.create_table :items do"
I have successfully run this using sqlite under the same conditions
ALSO if the DB connect fails due to bad password etc., the rescue code
is not entered, the program bombs out. Is this to be expected?
Thanks
Paul Fraser
code : ---------------------------------------
require 'rubygems'
require 'postgres'
require 'sequel'
begin
DB = Sequel.connect("postgres://postgres:[EMAIL PROTECTED]:5432/
postgresPlay")
rescue
puts "failed" # <<<<< never entered if connection fails
end
if DB.test_connection then
puts "connection test passed"
else
puts "connection test failed"
end
DB.create_table :items do # <<<<< fails here
column :name, :text
column :price, :float
end
output : --------------------------------------
C:/ruby/lib/ruby/gems/1.8/gems/sequel_core-1.0.2/lib/sequel_core/
adapters/postgres.rb:48:in `execute': undefined method `async_exec'
for #<PGconn:0x3b888c0> (NoMethodError)connection test passed
from C:/ruby/lib/ruby/gems/1.8/gems/sequel_core-1.0.2/lib/sequel_core/
adapters/postgres.rb:213:in `execute' from C:/ruby/lib/ruby/
gems/1.8/gems/assistance-0.1/lib/assistance/connection_pool.rb:61:in
`hold' from C:/ruby/lib/ruby/gems/1.8/gems/sequel_core-1.0.2/
lib/sequel_core/adapters/postgres.rb:213:in `execute' from C:/
ruby/lib/ruby/gems/1.8/gems/sequel_core-1.0.2/lib/sequel_core/
database.rb:177:in `create_table' from C:/ruby/lib/ruby/gems/
1.8/gems/sequel_core-1.0.2/lib/sequel_core/database.rb:177:in
`each' from C:/ruby/lib/ruby/gems/1.8/gems/sequel_core-1.0.2/
lib/sequel_core/database.rb:177:in `create_table' from C:\Users
\paulAdmin\Documents\NetBeansProjects\geonames\lib/geo_name_db.rb:
25 from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_require.rb:27:in `gem_original_require' from C:/ruby/lib/
ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/Users/paulAdmin/Documents/NetBeansProjects/geonames/lib/
geo_names.rb:7
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---