hassox / dm-polymorphic

An initial repo for polymorphism in datamapper
MIT License
28 stars 8 forks source link

Not loading in Sinatra #3

Open HoneyryderChuck opened 12 years ago

HoneyryderChuck commented 12 years ago

Hi,

I'm trying to bundle this gem with data mapper in my sinatra app, but somehow it cannot be loaded. I have them defined like this in my gemfile:


gem "data_mapper",              '1.2.0'
gem "dm-mysql-adapter",         '1.2.0'
gem "dm-polymorphic",           '0.10.2'

and I'm getting the following backtrace:


/Users/tiagocardoso/Projects/rightclearing-api/bundled_gems/ruby/1.9.1/gems/dm-polymorphic-0.10.2/lib/dm-polymorphic.rb:46:in `': undefined method `/' for # (NoMethodError)
    from /Users/tiagocardoso/Projects/rightclearing-api/app.rb:5:in `require'
    from /Users/tiagocardoso/Projects/rightclearing-api/app.rb:5:in `'
    from /Users/tiagocardoso/Projects/rightclearing-api/spec/spec_helper.rb:3:in `require'
    from /Users/tiagocardoso/Projects/rightclearing-api/spec/spec_helper.rb:3:in `'
    from /Users/tiagocardoso/Projects/rightclearing-api/spec/models/authorization_spec.rb:2:in `require'
    from /Users/tiagocardoso/Projects/rightclearing-api/spec/models/authorization_spec.rb:2:in `'
    from /Users/tiagocardoso/Projects/rightclearing-api/bundled_gems/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load'
    from /Users/tiagocardoso/Projects/rightclearing-api/bundled_gems/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `block in load_spec_files'
    from /Users/tiagocardoso/Projects/rightclearing-api/bundled_gems/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `map'
    from /Users/tiagocardoso/Projects/rightclearing-api/bundled_gems/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load_spec_files'
    from /Users/tiagocardoso/Projects/rightclearing-api/bundled_gems/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:22:in `run'
    from /Users/tiagocardoso/Projects/rightclearing-api/bundled_gems/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
    from /Users/tiagocardoso/Projects/rightclearing-api/bundled_gems/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'

Should this work under Sinatra?

HoneyryderChuck commented 12 years ago

Now that I have looked further into this, it looks like ur gem is outdated concerning the data mapper version. Is it so?