Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Can't convert nil into Hash when using a type from dm-types #51

Open
spockz opened this issue Feb 7, 2013 · 0 comments
Open

Can't convert nil into Hash when using a type from dm-types #51

spockz opened this issue Feb 7, 2013 · 0 comments

Comments

@spockz
Copy link

spockz commented Feb 7, 2013

When using a type from dm-types in migrations I get the following error: can't convert nil into Hash when running rake db:migrate. This is a rails project. Is it maybe related to #31, which is already closed?

The migration:

migration 1, :foo do
  up do
    create_table :rekenservices do
      column :id, DataMapper::Property::Serial, :key => true
      column :webaddress,       URI,     :required => true
    end
  end
end

Gemfile

source 'https://rubygems.org'

RAILS_VERSION = '~> 3.2.11'
DM_VERSION    = '~> 1.2.0'

gem 'activesupport',  RAILS_VERSION, :require => 'active_support'
gem 'actionpack',     RAILS_VERSION, :require => 'action_pack'
gem 'actionmailer',   RAILS_VERSION, :require => 'action_mailer'
gem 'activeresource', RAILS_VERSION, :require => 'active_resource'
gem 'railties',       RAILS_VERSION, :require => 'rails'
gem 'tzinfo',         '~> 0.3.32'


gem 'rails-i18n'
# gem 'rich_pluralization'

gem 'devise'
gem 'devise-encryptable'

gem 'dm-rails',               '~> 1.2.1'
gem 'dm-sqlite-adapter',      DM_VERSION


gem 'dm-migrations',   DM_VERSION
gem 'dm-types',        DM_VERSION
gem 'dm-validations',  DM_VERSION #:git => '[email protected]:spockz/dm-validations.git', :branch => 'compat'
gem 'dm-constraints',  DM_VERSION
gem 'dm-transactions', DM_VERSION
gem 'dm-aggregates',   DM_VERSION
gem 'dm-timestamps',   DM_VERSION
gem 'dm-observer',     DM_VERSION
gem 'dm-devise',       '~> 2.1.0'
gem 'dm-is-read_only'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.5'
  gem 'coffee-rails', '~> 3.2.2'
  gem 'uglifier',     '~> 1.2.4'
end

gem 'jquery-rails', '~> 2.0.1'

gem 'rdiscount'

gem "dm-paperclip", :git => 'git://github.com/phillbaker/dm-paperclip.git', :branch => "bug-dm1.2.0-rails3.2.8-ruby1.8.7"

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.1'

# Use unicorn as the web server
# gem 'unicorn', '~> 4.2.1'

# Deploy with Capistrano
# gem 'capistrano', '~> 2.11.2'

# To use debugger
# gem 'ruby-debug19', '~> 0.11.6', :require => 'ruby-debug'

group :test do
  # Pretty printed test output
  gem 'turn', '~> 0.9.4', :require => false
end

gem "libv8", "3.11.8.7"
gem "therubyracer"
gem "less-rails"
gem "twitter-bootstrap-rails", :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git'

gem 'cancan'
gem "airbrake"

Error log:

rake aborted!
can't convert nil into Hash
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/sql/table_creator.rb:90:in `update'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/sql/table_creator.rb:90:in `build_type'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/sql/table_creator.rb:60:in `initialize'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/sql/table_creator.rb:25:in `new'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/sql/table_creator.rb:25:in `column'
db/migrate/rekenservices.rb:26:in `block (3 levels) in <top (required)>'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/sql/table_creator.rb:17:in `instance_eval'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/sql/table_creator.rb:17:in `initialize'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration.rb:142:in `new'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration.rb:142:in `create_table'
db/migrate/rekenservices.rb:15:in `block (2 levels) in <top (required)>'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration.rb:103:in `call'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration.rb:103:in `block in perform_up'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration.rb:190:in `block in say_with_time'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration.rb:190:in `say_with_time'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration.rb:102:in `perform_up'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration_runner.rb:57:in `block in migrate_up!'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration_runner.rb:55:in `each'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-migrations-1.2.0/lib/dm-migrations/migration_runner.rb:55:in `migrate_up!'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-rails-1.2.1/lib/dm-rails/railties/database.rake:68:in `block (3 levels) in <top (required)>'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/dm-rails-1.2.1/lib/dm-rails/railties/database.rake:85:in `block (2 levels) in <top (required)>'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/alessandro/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/bin/rake:23:in `load'
/Users/alessandro/.rvm/gems/ruby-1.9.3-p327/bin/rake:23:in `<main>'
Tasks: TOP => db:migrate:up
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant