I'm getting the following error when I try to reference a Spira::Base in a Rails (3.2.14) controller:
I'm using the current master version of this gem. I'm currently setting the repository in an initializer. Presumably this error is related to the new repository threadsafe feature, as I can access Spira.repository and my Spira::Base objects just fine from Rails console.
I can get around this by doing (in my controller):
before_filter do
Spira.repository ||= RDF::DataObjects::Repository.new('sqlite3:test.db')
end
but I don't want to have to do this. Is there some way to make the repository play nice with Rails controllers, or is there a better/recommended place to define my repository where this won't be an issue?
I'm getting the following error when I try to reference a
Spira::Basein a Rails (3.2.14) controller:I'm using the current
masterversion of this gem. I'm currently setting the repository in an initializer. Presumably this error is related to the new repository threadsafe feature, as I can accessSpira.repositoryand mySpira::Baseobjects just fine from Rails console.I can get around this by doing (in my controller):
but I don't want to have to do this. Is there some way to make the repository play nice with Rails controllers, or is there a better/recommended place to define my repository where this won't be an issue?