1

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?

tishma
  • 173
  • 2
  • 11
  • Btw, I've also tried rebooting the machine, touching restart.txt - no luck. – tishma Mar 05 '12 at 10:56
  • 1
    Same problem here. Probably it happened after some ruby upgrades from official ubuntu repo. In my /var/log/apt/history.log i've entries like this >ruby1.8 (1.8.7.249-2, 1.8.7.249-2ubuntu0.1), libruby1.8 (1.8.7.249-2, 1.8.7.249-2ubuntu0.1), libreadline-ruby1.8 (1.8.7.249-2, 1.8.7.249-2ubuntu0.1) It could be related to the problem I think –  Mar 06 '12 at 10:01
  • I'll check the log. I'm pretty sure I have all updates turned off, as I really don't want to care about the future dependencies. I'm just happy the way things worked before. – tishma Mar 07 '12 at 21:09
  • Confirmed! I have these upgrades in both /var/log/apt/history.log and /var/log/dpkg.log (actually older logs). – tishma Mar 09 '12 at 14:17

2 Answers2

1

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

user115475
  • 11
  • 1
0

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

tishma
  • 173
  • 2
  • 11