#1280 ✓resolved
kgiszczak

Transaction are broken

Reported by kgiszczak | May 20th, 2010 @ 01:01 PM

Transactions are broken with rc2.

My Gemfile:

 source 'http://rubygems.org'
 gem 'dm-migrations',        '~> 1.0.0.rc2',  :git => 'git://github.com/datamapper/dm-migrations.git'
 gem 'dm-transactions',      '~> 1.0.0.rc2',  :git => 'git://github.com/datamapper/dm-transactions.git'
 gem 'dm-postgres-adapter',  '~> 1.0.0.rc2',  :git => 'git://github.com/datamapper/dm-postgres-adapter.git'
 gem 'dm-mysql-adapter',     '~> 1.0.0.rc2',  :git => 'git://github.com/datamapper/dm-mysql-adapter.git'
 gem 'dm-sqlite-adapter',    '~> 1.0.0.rc2',  :git => 'git://github.com/datamapper/dm-sqlite-adapter.git'
 gem 'dm-core',              '~> 1.0.0.rc2',  :git => 'git://github.com/datamapper/dm-core.git'
 gem 'dm-do-adapter',        '~> 1.0.0.rc2',  :git => 'git://github.com/datamapper/dm-do-adapter.git'

and my test.rb:

 require 'rubygems'
 require 'bundler'
 Bundler.setup
 Bundler.require(:default)
 DataMapper.setup(:default, 'postgres://postgres@localhost/transactions')
 # DataMapper.setup(:default, 'mysql://root@localhost/transactions')
 # DataMapper.setup(:default, 'sqlite3::memory:')
 class Transaction
   include DataMapper::Resource
   property :id, Serial
   property :name, String
 end
 DataMapper.auto_migrate!
 Transaction.transaction {}

I was testing for postgres, mysql and sqlite adapters and always get the same error:

 /Users/beerkg/.rvm/gems/ruby-1.8.7-p249/bundler/gems/dm-transactions-427b7e0cc8a851992f78a915e0faa2e85b621173-maste/lib/dm-transactions.rb:303:in connect_adapter': undefined methodtransaction_primitive' for #<DataMapper::Adapters::PostgresAdapter:0x102e86ea0> (NoMethodError)
 from /Users/beerkg/.rvm/gems/ruby-1.8.7-p249/bundler/gems/dm-transactions-427b7e0cc8a851992f78a915e0faa2e85b621173-master/lib/dm-transactions.rb:250:in send'
 from /Users/beerkg/.rvm/gems/ruby-1.8.7-p249/bundler/gems/dm-transactions-427b7e0cc8a851992f78a915e0faa2e85b621173-master/lib/dm-transactions.rb:250:ineach_adapter'
 from /Users/beerkg/.rvm/gems/ruby-1.8.7-p249/bundler/gems/dm-transactions-427b7e0cc8a851992f78a915e0faa2e85b621173-master/lib/dm-transactions.rb:249:in each_key'
 from /Users/beerkg/.rvm/gems/ruby-1.8.7-p249/bundler/gems/dm-transactions-427b7e0cc8a851992f78a915e0faa2e85b621173-master/lib/dm-transactions.rb:249:ineach_adapter'
 from /Users/beerkg/.rvm/gems/ruby-1.8.7-p249/bundler/gems/dm-transactions-427b7e0cc8a851992f78a915e0faa2e85b621173-master/lib/dm-transactions.rb:108:in begin'
 from /Users/beerkg/.rvm/gems/ruby-1.8.7-p249/bundler/gems/dm-transactions-427b7e0cc8a851992f78a915e0faa2e85b621173-master/lib/dm-transactions.rb:130:incommit'
 from /Users/beerkg/.rvm/gems/ruby-1.8.7-p249/bundler/gems/dm-transactions-427b7e0cc8a851992f78a915e0faa2e85b621173-master/lib/dm-transactions.rb:373:in transaction'
 from test.rb:19</code>
</pre>

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Referenced by

Pages