Defect #6917
closedrespond_to_without_attributes? does not work from runner
0%
Description
If have written a script that is executed with the ruby on rails runner. This script requires all repositories (which can be hg, svn or git in my setup). When a iterate over all repositories it gives an exception on the first git repository. This occurs because respond_to_without_attributes? is not defined on git instances. This only occurs in the runner, not in the a plugin.
I can work around this by wrapping lines 1652 to 1660 with
if object.respond_to? :respond_to_without_attributes?
The side-effect of this workaround is that the type of the git repository objects is not Repository::Git such as Repository::Mercurial but just Git.
Updated by Bart Vanbrabant about 14 years ago
Sorry. The version is 1.0.2 and this file I mentioned is vendor/rails/activerecord/lib/active_record/base.rb
Updated by Holger Just 2 months ago
- Status changed from New to Closed
- Resolution set to Cant reproduce
Iterating over all defined repositories appears to work fine when starting a console (or runner).
If you still experience this error, please provide more details which allow us to reproduce this with a current version of Redmine.