Hello Avinash,

Did you install do_sqlite3 and dm-sqlite-adapter? I wonder what tutorial you
are following, since sqlite3-ruby isn't needed nor used with DataMapper. If
that is mentioned in the tutorial, we should see if we can fix that, since
it's not needed and can lead people onto the wrong path.

Could you try again after installing do_sqlite3 and dm-sqlite-adapter?

-- 
Regards,

Dirkjan Bussink

On 31 Aug 2010, at 01:00, [email protected] wrote:

Hey,

I have been going through a Sinatra tuorial and trying to get the DM
gem to work all morning and havent got very far, any help or pointers
is greatly appreciated!!

My environment,
Mac OSX 10.6
$ ruby -v
ruby 1.8.7 (2009-06-08 patchlevel 173) [universal-darwin10.0]
$ gem -v
1.3.5

Code Snippet I am trying to run
http://pastie.org/1127792

I have the following sqlite3 gem installed
$ gem list | grep sqlite3-ruby
sqlite3-ruby (1.3.1, 1.2.4)

Installed the DM and dm-sqlite-adapter gems
http://pastie.org/1127794

However I am getting this error,
$ ruby adserver.rb
/Library/Ruby/Gems/1.8/gems/data_objects-0.10.2/lib/data_objects/
connection.rb:76:in `initialize': unable to open database file
(DataObjects::ConnectionError)
from /Library/Ruby/Gems/1.8/gems/data_objects-0.10.2/lib/data_objects/
connection.rb:76:in `send'
from /Library/Ruby/Gems/1.8/gems/data_objects-0.10.2/lib/data_objects/
connection.rb:76:in `__new'
from /Library/Ruby/Gems/1.8/gems/data_objects-0.10.2/lib/data_objects/
pooling.rb:177:in `new'
from /Library/Ruby/Gems/1.8/gems/data_objects-0.10.2/lib/data_objects/
pooling.rb:172:in `synchronize'
from /Library/Ruby/Gems/1.8/gems/data_objects-0.10.2/lib/data_objects/
pooling.rb:172:in `new'
from /Library/Ruby/Gems/1.8/gems/data_objects-0.10.2/lib/data_objects/
pooling.rb:119:in `new'
from /Library/Ruby/Gems/1.8/gems/data_objects-0.10.2/lib/data_objects/
connection.rb:65:in `new'
from /Library/Ruby/Gems/1.8/gems/dm-do-adapter-1.0.0/lib/dm-do-
adapter/adapter.rb:235:in `open_connection'
from /Library/Ruby/Gems/1.8/gems/dm-do-adapter-1.0.0/lib/dm-do-
adapter/adapter.rb:260:in `with_connection'
from /Library/Ruby/Gems/1.8/gems/dm-do-adapter-1.0.0/lib/dm-do-
adapter/adapter.rb:33:in `select'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/adapters/dm-sqlite-adapter.rb:43:in `table_info'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/adapters/dm-sqlite-adapter.rb:18:in `storage_exists?'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/adapters/dm-do-adapter.rb:82:in `create_model_storage'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/adapters/dm-do-adapter.rb:57:in `upgrade_model_storage'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/auto_migration.rb:71:in `upgrade_model_storage'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/auto_migration.rb:143:in `auto_upgrade!'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/auto_migration.rb:45:in `send'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/auto_migration.rb:45:in `repository_execute'
from /Library/Ruby/Gems/1.8/gems/dm-core-1.0.0/lib/dm-core/model/
descendant_set.rb:33:in `each'
from /Library/Ruby/Gems/1.8/gems/dm-core-1.0.0/lib/dm-core/model/
descendant_set.rb:33:in `each'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/auto_migration.rb:44:in `repository_execute'
from /Library/Ruby/Gems/1.8/gems/dm-migrations-1.0.0/lib/dm-
migrations/auto_migration.rb:27:in `auto_upgrade!'
from adserver.rb:16


Thanks,
Avinash

-- 
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected]<datamapper%[email protected]>
.
For more options, visit this group at
http://groups.google.com/group/datamapper?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en.

Reply via email to