Skip to content

Instantly share code, notes, and snippets.

@daddz
Created October 6, 2010 20:17
Show Gist options
  • Save daddz/613997 to your computer and use it in GitHub Desktop.
Save daddz/613997 to your computer and use it in GitHub Desktop.
data_mapper (1.0.2)
data_objects (0.10.2)
datamapper (1.0.2)
dm-aggregates (1.0.2)
dm-constraints (1.0.2)
dm-core (1.0.2)
dm-do-adapter (1.0.2)
dm-migrations (1.0.2)
dm-serializer (1.0.2)
dm-sqlite-adapter (1.0.2)
dm-timestamps (1.0.2)
dm-transactions (1.0.2)
dm-types (1.0.2)
dm-validations (1.0.2)
do_sqlite3 (0.10.2)
extlib (0.9.15)
/usr/lib/ruby/gems/1.9.1/gems/data_objects-0.10.2/lib/data_objects/connection.rb:76:in `initialize': unable to open database file (DataObjects::ConnectionError)
from /usr/lib/ruby/gems/1.9.1/gems/data_objects-0.10.2/lib/data_objects/connection.rb:76:in `new'
from /usr/lib/ruby/gems/1.9.1/gems/data_objects-0.10.2/lib/data_objects/pooling.rb:177:in `block in new'
from <internal:prelude>:10:in `synchronize'
from /usr/lib/ruby/gems/1.9.1/gems/data_objects-0.10.2/lib/data_objects/pooling.rb:172:in `new'
from /usr/lib/ruby/gems/1.9.1/gems/data_objects-0.10.2/lib/data_objects/pooling.rb:119:in `new'
from /usr/lib/ruby/gems/1.9.1/gems/data_objects-0.10.2/lib/data_objects/connection.rb:65:in `new'
from /usr/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.0.2/lib/dm-do-adapter/adapter.rb:235:in `open_connection'
from /usr/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.0.2/lib/dm-do-adapter/adapter.rb:260:in `with_connection'
from /usr/lib/ruby/gems/1.9.1/gems/dm-do-adapter-1.0.2/lib/dm-do-adapter/adapter.rb:33:in `select'
from /usr/lib/ruby/gems/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/adapters/dm-sqlite-adapter.rb:77:in `sqlite_version'
from /usr/lib/ruby/gems/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/adapters/dm-sqlite-adapter.rb:38:in `supports_drop_table_if_exists?'
from /usr/lib/ruby/gems/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/adapters/dm-do-adapter.rb:101:in `destroy_model_storage'
from /usr/lib/ruby/gems/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:87:in `destroy_model_storage'
from /usr/lib/ruby/gems/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:160:in `auto_migrate_down!'
from /usr/lib/ruby/gems/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:129:in `auto_migrate!'
from /usr/lib/ruby/gems/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:45:in `block in repository_execute'
from /usr/lib/ruby/gems/1.9.1/gems/dm-core-1.0.2/lib/dm-core/support/descendant_set.rb:68:in `block in each'
from /usr/lib/ruby/gems/1.9.1/gems/dm-core-1.0.2/lib/dm-core/support/descendant_set.rb:67:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/dm-core-1.0.2/lib/dm-core/support/descendant_set.rb:67:in `each'
from /usr/lib/ruby/gems/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:44:in `repository_execute'
from /usr/lib/ruby/gems/1.9.1/gems/dm-migrations-1.0.2/lib/dm-migrations/auto_migration.rb:22:in `auto_migrate!'
from init.rb:17:in `<main>'
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
gem --version => 1.3.7
#!/usr/bin/env ruby
require 'dm-core'
require 'dm-migrations'
class Message
include DataMapper::Resource
property :id, Serial
property :sender, String
property :message, String
end
DataMapper.setup(:default, 'sqlite:///#{Dir.pwd}/development.db')
DataMapper.auto_migrate!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment