I was a happy user of redmine for like 6 months. My plan was to set it up and never update anything in order not to deal with dependencies and stuff.
I'm using Ubuntu server 10.04 (Apache/Passenger) with disabled all kinds of updates.
This morning I started getting Internal Error in browser.
Log file says something like:
Processing WelcomeController#index (for 192.168.1.23 at 2012-03-05 10:44:12) [GET]
Parameters: {"action"=>"index", "controller"=>"welcome"}
NoMethodError (undefined method `[]' for nil:NilClass):
/app/models/setting.rb:100:in `value='
/vendor/rails/activerecord/lib/active_record/base.rb:2589:in `send'
/vendor/rails/activerecord/lib/active_record/base.rb:2589:in `attributes='
/vendor/rails/activerecord/lib/active_record/base.rb:2585:in `each'
/vendor/rails/activerecord/lib/active_record/base.rb:2585:in `attributes='
/vendor/rails/activerecord/lib/active_record/base.rb:2285:in `initialize'
...
I'm new to Ruby/Rails, and it is about the last thing I wanted to learn about at the moment. How do I get a clue what's wrong so I can try and fix it?
Hash map security fix in ubuntu ruby package caused hash maps have different order of keys, randomly. But in redmine 0.9.3, which is ubuntu redmine package version, settings.rb has value= atribute accessor, which is dependent on correct attribute hash order (:name first, :value second).
Here is description of the bug and possible fix:
https://bugs.launchpad.net/ubuntu/+source/redmine/+bug/949011 http://www.redmine.org/projects/redmine/repository/revisions/8909/diff/trunk/app/models/setting.rb
It appears that I was not the only one.
Luckily - restarting (or reloading) Apache ONLY (as opposed to restarting the machine) does help. Some had to restart Apache twice. Apache error log doesn't help either.
http://www.redmine.org/boards/2/topics/29317 http://www.redmine.org/boards/1/topics/29209