https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-02-09T18:46:30ZRedmineRedmine - Defect #4780: ActionView::TemplateError (undefined method `<=>' for nil:NilClass)https://www.redmine.org/issues/4780?journal_id=141492010-02-09T18:46:30ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>There's something wrong with your project tree. Can you try:</p>
<pre><code>ruby script/runner -e production 'Project.rebuild!'</code></pre>
<p>Can you also give the output of the following query so I can try to reproduce:</p>
<pre><code>SELECT id, parent_id, lft, rgt FROM projects</code></pre> Redmine - Defect #4780: ActionView::TemplateError (undefined method `<=>' for nil:NilClass)https://www.redmine.org/issues/4780?journal_id=141772010-02-10T07:48:32ZAnonymous
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Problem is resolved.</p>
<pre>
ruby script/runner -e production 'Project.rebuild!'
</pre> did the trick! Redmine - Defect #4780: ActionView::TemplateError (undefined method `<=>' for nil:NilClass)https://www.redmine.org/issues/4780?journal_id=141812010-02-10T09:09:22ZFelix Schäfer
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul> Redmine - Defect #4780: ActionView::TemplateError (undefined method `<=>' for nil:NilClass)https://www.redmine.org/issues/4780?journal_id=233472010-12-21T07:13:42ZKaoru Kobo
<ul></ul><p>I met same problem.</p>
<p>How about changing the instruction in RedmineUpgrade: <a class="external" href="http://www.redmine.org/wiki/redmine/RedmineUpgrade">http://www.redmine.org/wiki/redmine/RedmineUpgrade</a></p>
<p>to following?</p>
<pre>
rake db:migrate RAILS_ENV=production
ruby script/runner -e production 'Project.rebuild!'
</pre> Redmine - Defect #4780: ActionView::TemplateError (undefined method `<=>' for nil:NilClass)https://www.redmine.org/issues/4780?journal_id=237152011-01-05T22:26:37ZAdrien Crivelli
<ul></ul><p>I also had same symptoms. However the issue in my case was corrupted data. One project (which was manually migrated from another redmine instance using the script mentionned there: <a class="external" href="http://www.redmine.org/boards/1/topics/20067?r=20204#message-20204">http://www.redmine.org/boards/1/topics/20067?r=20204#message-20204</a>) had a <code>parent_id</code> value set to 0.</p>
<p>Once identified it was quickly fixed with: <code>UPDATE projects SET parent_id = NULL WHERE parent_id = 0;</code></p>