undefined method `include?' for nil:NilClass in 1.2.0 but not 1.1.0 #159
Comments
You forgot to call DataMapper.finalize |
Right you are. Thanks, solnic! Looking at the datamapper.org page again, the necessity or even the existence of this method isn't super obvious. It might be beneficial to document it a little more loudly for TL;DR folks like myself or maybe raise an exception? As far as I'm concerned this issue can be can be closed. I don't know what the GitHub etiquette is on closing issues on other's repos. |
Hi Chris, On Oct 26, 2011, at 10:42 PM, Chris Cummings wrote:
Call Behavior changed a bit in 1.2.0—calling DataMapper.finalize used to be strongly recommended, but is now required.
The failure behavior could be improved... Hope that helps, |
Indeed it does. Thanks, Emmanuel. |
Ran into this as well... a more obvious failure behavior would be great! |
@youens failure behavior will be improved in 1.3.0 |
I appreciate the issue being here as I found it quickly when I ran into the same thing. |
Finalize Models DataMapper.finalize This issue is troubled me more times,thanks . |
I'm using DataMapper with Sinatra and I've found that I keep getting the following error with DataMapper 1.2.0:
Backtrace
There's nothing wrong with the file mentioned
controllers/tag.rb
. I get the same error with any path that tries to create/update/delete a record. If I forcegem 'data_mapper', '= 1.1.0'
in myGemfile
I don't experience the issue.Potentially pertinent code
controllers/tag.rb
Like I said, the error pops up on any path that attempts to edit a record. Additionally, the
require_administrative_privileges
andtag_validate!
methods don't do anything magical and commenting them out makes no difference.My DataMapper models file
The text was updated successfully, but these errors were encountered: