Getting "uninitialized constant RepositoryObserver"? Oops!..
Weird things are happening to those Redmine 2.x.x observers... Here they work, there they don't...
SCM Creator 0.4.0 was aimed to support Redmine 2.0.x and Rails 3... So to port it I installed clean Redmine 2.0.x with SCM Creator 0.3.0 and the first thing I noticed was that I could not migrate the plugin because of error:
uninitialized constant RepositoryObserver
So I applied the fix:
Rails.configuration.active_record.observers << :repository_observer
After that the plugin migrated! Being happy with it I continued porting...
Then, almost before making the release, I discovered that RepositoryObserver
does not get called! And, to my surprise, returning to ActiveRecord::Base.observers << :repository_observer
worked for Redmine 2.0! I assumed that there was something else, that I had fixed along with this issue, and made the release...
But then it has been discovered that it does not work for all of us! Fixing this weird issue has ended with this emergency release!
Many thanks to Rob Landry for discovering the issue and assisting in fixing it!
Thanks also to Ismail SEZEN for Turkish translation and to Fabien Crespel for update of French translation!
Comments