Project

General

Profile

Update Redmine 3.2.1 -> 3.3.0 partially failed

Added by Emmanuel DUMAS over 8 years ago

Hello

Today, I have an update of redmine version (3.2.1 -> 3.3.0 ) that partially failed : no problem for me (administrator), error for an other user.

History of my installation:
Redmine with postgresql on Debian Jessie.
First installation : redmine 3.0.3
Succesful update : 3.0.3 -> 3.1.0 -> 3.1.1 -> 3.2.0 -> 3.2.1

Today update 3.2.1 -> 3.3.0
command :
tar zxvf redmine-3.3.0.tar.gz
cd redmine-3.3.0/
sudo service apache2 stop
cp ../redmine-3.2.1/config/database.yml config/database.yml
export RAILS_ENV="production"
rbenv local system
bundle install --without development test
bundle exec rake generate_secret_token
sudo emacs -nw /etc/apache2/sites-enabled/000-default.conf ( -> update link to new version)
sudo reboot

After this, I see no trouble.
But an other user have page "error" when he try to access to "my Page".

In log/production.log, for me I see :

Started GET "/my/page" for 192.168.0.192 at 2016-06-29 08:05:51 +0200
Processing by MyController#page as HTML
Current user: XXXXXXXXX (id=6)
Rendered common/_calendar.html.erb (95.4ms)
Rendered my/blocks/_calendar.html.erb (235.7ms)
Rendered my/blocks/_timelog.html.erb (100.0ms)
Rendered issues/_list_simple.html.erb (5.5ms)
Rendered my/blocks/_issuesassignedtome.html.erb (21.8ms)
Rendered issues/_list_simple.html.erb (12.8ms)
Rendered my/blocks/_issuesreportedbyme.html.erb (24.7ms)
Rendered my/page.html.erb within layouts/base (388.7ms)
Completed 200 OK in 433ms (Views: 288.6ms | ActiveRecord: 135.4ms)

And for other user :

Started GET "/my/page" for 192.168.0.140 at 2016-06-29 08:56:04 +0200
Processing by MyController#page as HTML
Current user: XXXXXXXXXX (id=30)
Rendered my/blocks/_calendar.html.erb (66.7ms)
Rendered my/page.html.erb within layouts/base (67.3ms)
Completed 500 Internal Server Error in 80ms (ActiveRecord: 9.1ms)

ActionView::Template::Error (undefined method `accessor' for #<ActiveRecord::Type::Value:0x007f5f47b34e28>):
1: <h3><%= l(:label_calendar) ></h3>
2:
3: <
calendar = Redmine::Helpers::Calendar.new(User.current.today, current_language, :week)
4: calendar.events = calendar_items(calendar.startdt, calendar.enddt) >
5:
6: <
= render :partial => 'common/calendar', :locals => {:calendar => calendar } %>
app/models/role.rb:213:in `permissions_all_trackers'
app/models/role.rb:222:in `permissions_all_trackers?'
app/models/issue.rb:139:in `block in visible_condition'
app/models/project.rb:215:in `block in allowed_to_condition'
app/models/project.rb:214:in `each'
app/models/project.rb:214:in `allowed_to_condition'
app/models/issue.rb:122:in `visible_condition'
app/models/issue.rb:80:in `block in <class:Issue>'
app/helpers/my_helper.rb:22:in `calendar_items'
app/views/my/blocks/_calendar.html.erb:4:in `_app_views_my_blocks__calendar_html_erb___3695473805920587167_70917940'
app/views/my/page.html.erb:11:in `block in app_views_my_page_html_erb__1169032471498722181_70990240'
app/views/my/page.html.erb:8:in `each'
app/views/my/page.html.erb:8:in `_app_views_my_page_html_erb___1169032471498722181_70990240'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

I come back in version 3.2.3, and no more trouble.

After come back, information for my installation are :
Environment:
Redmine version 3.2.3.stable
Ruby version 2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
Rails version 4.2.5.2
Environment production
Database adapter PostgreSQL
SCM:
Subversion 1.8.10
Git 2.1.4
Filesystem
Redmine plugins:
no plugin installed

If you need more information , ask me.

What Can I do to run in version 3.3.0 for all user ?

Best regard
Emmanuel


Replies (3)

RE: Update Redmine 3.2.1 -> 3.3.0 partially failed - Added by Toshi MARUYAMA over 8 years ago

Did you run "rake db:migrate"?

RE: Update Redmine 3.2.1 -> 3.3.0 partially failed - Added by Emmanuel DUMAS over 8 years ago

Thank you !

Redmine have no bug.
My upgrade procedure was buggy !
I have to re-read carefully http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

So, by doing this :

tar zxvf redmine-3.3.0.tar.gz
cd redmine-3.3.0/
sudo service apache2 stop
cp ../redmine-3.2.1/config/database.yml config/database.yml
export RAILS_ENV="production" 
rbenv local system
bundle install --without development test
bundle exec rake generate_secret_token
bundle exec rake db:migrate RAILS_ENV=production
bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
sudo emacs -nw /etc/apache2/sites-enabled/000-default.conf ( -> update link to new version)
sudo reboot

I migrate from 3.2 -> 3.3 without trouble for all user.

Best regard
Emmanuel

RE: Update Redmine 3.2.1 -> 3.3.0 partially failed - Added by soyoko soyokos about 7 years ago

Best solved!
Just
" rake db:migrate RAILS_ENV="production" "

thank u https://github.com/mcondarelli

    (1-3/3)