rsl/stringex

`acts_as_url` method missing for datamapper

Closed this issue · 7 comments

I have a simply scenario using only datamapper as ORM. I have been following the documentation and added:

acts_as_url :text

to an Expression model. I'm getting the following error:

/var/lib/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/model/relationship.rb:372:in `method_missing': undefined method `acts_as_url' for Expression:Class (NoMethodError)

Is there anything more we should do to get the adapter loaded?

Thank you!

rsl commented

to be sure, your class includes DataMapper::Resource?

to be sure, I have checked again, and yes :)

rsl commented

do the tests pass on yr machine? cause they're definitely passing for me and travis and... others. hehe. can't duplicate it not loading.

I'm getting following notice in the output:

Running ActsAsUrl tests with ActiveRecord adapter

How can I run the tests with DataMapper adapter? (I'm not used to test-unit)

rsl commented

rake -T shows you all the available rake tasks. you should find rake test:data_mapper listed there.

Argh...

yeah, tests are passing for datamapper... and mine, too

Yesterday it didn't, I promise :) Surely it has to do with the fact that I'm running rake commands with spring and surely it was being executed in a cached environment withstringex 1.5, which was locked to Gemfile.lock by dm-types until I removed it as a dependency. Surely spring didn't detect the change even if I updated the lock file, until now that everything has been restarted.

Thank you and sorry for the noise.... I don't like people who post wrong issues, hehehe :)

rsl commented

hehe no problems. happy to investigate even if it's a dead end.