I ran into an issue earlier where adding a sub project to an already existing Redmine project produced an error and after a little bit of troubleshooting determined that upgrading Redmine would resolve the issue. During the upgrade process I ran into some other issues including a specific migration error using rake that is noted below. The upgrade process involved upgrading Redmine 0.8.3 to Redmine 0.9.3.
Upgrading Redmine Rake Migration Error:
- [web@dev devredmine]$ rake db:migrate RAILS_ENV=production
- (in /home/web/devredmine)
- rake aborted!
- uninitialized constant ActionController::AbstractRequest
- (See full trace by running task with --trace)
- [web@dev devredmine]$
As you can see above the error notes an issue with the ActionController:AbstractRequest controller. I figured the issue may be with one of the plugins I had moved over from the initial version of Redmine (0.8.3) so that is where I started investigating. Below is a list of the plugins including the ones that come bundled with Redmine and the plugins I moved over from the initial 0.8.3 Redmine installation.
List Of Redmine Plugins In /redmine-root/vendor/plugins:
- [web@dev plugins]$ ls -alh
- total 96K
- drwxr-xr-x 24 web web 4.0K Mar 30 16:33 .
- drwxr-xr-x 5 web web 4.0K Feb 28 04:28 ..
- drwxrwxr-x 4 web web 4.0K Apr 25 2009 action_mailer_optional_tls
- drwxr-xr-x 3 web web 4.0K Apr 5 2009 actionwebservice
- drwxr-xr-x 3 web web 4.0K Feb 28 04:28 acts_as_activity_provider
- drwxr-xr-x 3 web web 4.0K Feb 28 04:28 acts_as_attachable
- drwxr-xr-x 3 web web 4.0K Feb 28 04:28 acts_as_customizable
- drwxr-xr-x 3 web web 4.0K Feb 28 04:28 acts_as_event
- drwxr-xr-x 4 web web 4.0K Feb 28 04:28 acts_as_list
- drwxr-xr-x 3 web web 4.0K Feb 28 04:28 acts_as_searchable
- drwxr-xr-x 4 web web 4.0K Feb 28 04:28 acts_as_tree
- drwxr-xr-x 4 web web 4.0K Feb 28 04:28 acts_as_versioned
- drwxr-xr-x 3 web web 4.0K Feb 28 04:28 acts_as_watchable
- drwxr-xr-x 5 web web 4.0K Feb 28 04:28 awesome_nested_set
- drwxr-xr-x 4 web web 4.0K Feb 28 04:28 classic_pagination
- drwxr-xr-x 4 web web 4.0K Feb 28 04:28 coderay-0.7.6.227
- drwxr-xr-x 6 web web 4.0K Feb 28 04:28 engines
- drwxr-xr-x 7 web web 4.0K Apr 5 2009 gloc-1.1.0
- drwxr-xr-x 4 web web 4.0K Feb 28 04:28 gravatar
- drwxr-xr-x 6 web web 4.0K Feb 28 04:28 open_id_authentication
- drwxr-xr-x 2 web web 4.0K Feb 28 04:28 prepend_engine_views
- drwxr-xr-x 4 web web 4.0K Feb 28 04:28 rfpdf
- drwxr-xr-x 4 web web 4.0K Feb 28 04:28 ruby-net-ldap-0.0.4
- drwxr-xr-x 11 web web 4.0K Apr 26 2009 stuff_to_do_plugin
Now from within the plugins directory I issued the below grep command to see if any of the plugins referenced the ActionController:AbstractRequest controller and as you can see below I got results.
Grep Redmine Plugins Directory For ActionController:AbstractRequest Controller:
- [web@dev plugins]$ grep -r ActionController::AbstractRequest *
- actionwebservice/lib/action_web_service/protocol/abstract.rb: class SimpleActionPackRequest < ActionController::AbstractRequest # :nodoc:
As you can see above the issue appears to be with the actionwebservice plugin which I couldn’t remember if I had installed or if it had come bundled with Redmine. During the upgrade process I moved it from the initial Redmine installation plugins directory over to the upgraded install. After a bit of research I found out that the actionwebservice plugin had come bundled with previous versions of Redmine but was no longer bundled with it anymore so I removed it as shown below and proceeded forward with the migration.
Remove actionwebservice Redmine Plugin:
- [web@dev plugins]$ pwd
- /home/web/devredmine/vendor/plugins
- [web@dev plugins]$ rm -rf actionwebservice/
- [web@dev plugins]$
After removing the actionwebservice plugin I was able to proceed with the migration using the rake db:migrate command as displayed below.
Use Rake To Migrate Changes To MySQL Database During Redmine Upgrade:
- [web@dev devredmine]$ rake db:migrate RAILS_ENV=production
- (in /home/web/devredmine)
- == AddTypeToEnumerations: migrating ==========================================
- -- add_column(:enumerations, :type, :string)
- -> 0.4763s
- == AddTypeToEnumerations: migrated (0.4766s) =================================
- == UpdateEnumerationsToSti: migrating ========================================
- == UpdateEnumerationsToSti: migrated (0.0484s) ===============================
- == AddActiveFieldToEnumerations: migrating ===================================
- -- add_column(:enumerations, :active, :boolean, {:null=>false, :default=>true})
- -> 0.0332s
- == AddActiveFieldToEnumerations: migrated (0.0334s) ==========================
- == AddProjectToEnumerations: migrating =======================================
- -- add_column(:enumerations, :project_id, :integer, {:null=>true, :default=>nil})
- -> 0.2378s
- -- add_index(:enumerations, :project_id)
- -> 0.0630s
- == AddProjectToEnumerations: migrated (0.3013s) ==============================
- == AddParentIdToEnumerations: migrating ======================================
- -- add_column(:enumerations, :parent_id, :integer, {:null=>true, :default=>nil})
- -> 0.1083s
- == AddParentIdToEnumerations: migrated (0.1085s) =============================
- == AddQueriesGroupBy: migrating ==============================================
- -- add_column(:queries, :group_by, :string)
- -> 0.0585s
- == AddQueriesGroupBy: migrated (0.0587s) =====================================
- == CreateMemberRoles: migrating ==============================================
- -- create_table(:member_roles)
- -> 0.0274s
- == CreateMemberRoles: migrated (0.0276s) =====================================
- == PopulateMemberRoles: migrating ============================================
- == PopulateMemberRoles: migrated (0.4907s) ===================================
- == DropMembersRoleId: migrating ==============================================
- -- remove_column(:members, :role_id)
- -> 0.0381s
- == DropMembersRoleId: migrated (0.0385s) =====================================
- == FixMessagesStickyNull: migrating ==========================================
- == FixMessagesStickyNull: migrated (0.0011s) =================================
- == PopulateUsersType: migrating ==============================================
- == PopulateUsersType: migrated (0.0540s) =====================================
- == CreateGroupsUsers: migrating ==============================================
- -- create_table(:groups_users, {:id=>false})
- -> 0.0885s
- -- add_index(:groups_users, [:group_id, :user_id], {:name=>:groups_users_ids, :unique=>true})
- -> 0.1025s
- == CreateGroupsUsers: migrated (0.1916s) =====================================
- == AddMemberRolesInheritedFrom: migrating ====================================
- -- add_column(:member_roles, :inherited_from, :integer)
- -> 0.1455s
- == AddMemberRolesInheritedFrom: migrated (0.1457s) ===========================
- == FixUsersCustomValues: migrating ===========================================
- == FixUsersCustomValues: migrated (0.0037s) ==================================
- == AddMissingIndexesToWorkflows: migrating ===================================
- -- add_index(:workflows, :old_status_id)
- -> 0.1403s
- -- add_index(:workflows, :role_id)
- -> 0.1037s
- -- add_index(:workflows, :new_status_id)
- -> 0.0380s
- == AddMissingIndexesToWorkflows: migrated (0.2828s) ==========================
- == AddMissingIndexesToCustomFieldsProjects: migrating ========================
- -- add_index(:custom_fields_projects, [:custom_field_id, :project_id])
- -> 0.0571s
- == AddMissingIndexesToCustomFieldsProjects: migrated (0.0573s) ===============
- == AddMissingIndexesToMessages: migrating ====================================
- -- add_index(:messages, :last_reply_id)
- -> 0.0205s
- -- add_index(:messages, :author_id)
- -> 0.1680s
- == AddMissingIndexesToMessages: migrated (0.1889s) ===========================
- == AddMissingIndexesToRepositories: migrating ================================
- -- add_index(:repositories, :project_id)
- -> 0.0278s
- == AddMissingIndexesToRepositories: migrated (0.0280s) =======================
- == AddMissingIndexesToComments: migrating ====================================
- -- add_index(:comments, [:commented_id, :commented_type])
- -> 0.0995s
- -- add_index(:comments, :author_id)
- -> 0.0877s
- == AddMissingIndexesToComments: migrated (0.1876s) ===========================
- == AddMissingIndexesToEnumerations: migrating ================================
- -- add_index(:enumerations, [:id, :type])
- -> 0.0189s
- == AddMissingIndexesToEnumerations: migrated (0.0190s) =======================
- == AddMissingIndexesToWikiPages: migrating ===================================
- -- add_index(:wiki_pages, :wiki_id)
- -> 0.1099s
- -- add_index(:wiki_pages, :parent_id)
- -> 0.0900s
- == AddMissingIndexesToWikiPages: migrated (0.2003s) ==========================
- == AddMissingIndexesToWatchers: migrating ====================================
- -- add_index(:watchers, :user_id)
- -> 0.0437s
- -- add_index(:watchers, [:watchable_id, :watchable_type])
- -> 0.0572s
- == AddMissingIndexesToWatchers: migrated (0.1012s) ===========================
- == AddMissingIndexesToAuthSources: migrating =================================
- -- add_index(:auth_sources, [:id, :type])
- -> 0.1154s
- == AddMissingIndexesToAuthSources: migrated (0.1156s) ========================
- == AddMissingIndexesToDocuments: migrating ===================================
- -- add_index(:documents, :category_id)
- -> 0.0534s
- == AddMissingIndexesToDocuments: migrated (0.0536s) ==========================
- == AddMissingIndexesToTokens: migrating ======================================
- -- add_index(:tokens, :user_id)
- -> 0.0486s
- == AddMissingIndexesToTokens: migrated (0.0489s) =============================
- == AddMissingIndexesToChangesets: migrating ==================================
- -- add_index(:changesets, :user_id)
- -> 0.2773s
- -- add_index(:changesets, :repository_id)
- -> 0.3649s
- == AddMissingIndexesToChangesets: migrated (0.6426s) =========================
- == AddMissingIndexesToIssueCategories: migrating =============================
- -- add_index(:issue_categories, :assigned_to_id)
- -> 0.0179s
- == AddMissingIndexesToIssueCategories: migrated (0.0181s) ====================
- == AddMissingIndexesToMemberRoles: migrating =================================
- -- add_index(:member_roles, :member_id)
- -> 0.0591s
- -- add_index(:member_roles, :role_id)
- -> 0.0329s
- == AddMissingIndexesToMemberRoles: migrated (0.0923s) ========================
- == AddMissingIndexesToBoards: migrating ======================================
- -- add_index(:boards, :last_message_id)
- -> 0.0113s
- == AddMissingIndexesToBoards: migrated (0.0115s) =============================
- == AddMissingIndexesToUserPreferences: migrating =============================
- -- add_index(:user_preferences, :user_id)
- -> 0.0639s
- == AddMissingIndexesToUserPreferences: migrated (0.0641s) ====================
- == AddMissingIndexesToIssues: migrating ======================================
- -- add_index(:issues, :status_id)
- -> 0.1857s
- -- add_index(:issues, :category_id)
- -> 0.1745s
- -- add_index(:issues, :assigned_to_id)
- -> 0.3924s
- -- add_index(:issues, :fixed_version_id)
- -> 0.6831s
- -- add_index(:issues, :tracker_id)
- -> 0.3337s
- -- add_index(:issues, :priority_id)
- -> 0.3745s
- -- add_index(:issues, :author_id)
- -> 0.6731s
- == AddMissingIndexesToIssues: migrated (2.8183s) =============================
- == AddMissingIndexesToMembers: migrating =====================================
- -- add_index(:members, :user_id)
- -> 0.0400s
- -- add_index(:members, :project_id)
- -> 0.1568s
- == AddMissingIndexesToMembers: migrated (0.1974s) ============================
- == AddMissingIndexesToCustomFields: migrating ================================
- -- add_index(:custom_fields, [:id, :type])
- -> 0.0219s
- == AddMissingIndexesToCustomFields: migrated (0.0221s) =======================
- == AddMissingIndexesToQueries: migrating =====================================
- -- add_index(:queries, :project_id)
- -> 0.0320s
- -- add_index(:queries, :user_id)
- -> 0.0261s
- == AddMissingIndexesToQueries: migrated (0.0585s) ============================
- == AddMissingIndexesToTimeEntries: migrating =================================
- -- add_index(:time_entries, :activity_id)
- -> 0.0221s
- -- add_index(:time_entries, :user_id)
- -> 0.0122s
- == AddMissingIndexesToTimeEntries: migrated (0.0348s) ========================
- == AddMissingIndexesToNews: migrating ========================================
- -- add_index(:news, :author_id)
- -> 0.0302s
- == AddMissingIndexesToNews: migrated (0.0304s) ===============================
- == AddMissingIndexesToUsers: migrating =======================================
- -- add_index(:users, [:id, :type])
- -> 0.0626s
- -- add_index(:users, :auth_source_id)
- -> 0.0562s
- == AddMissingIndexesToUsers: migrated (0.1192s) ==============================
- == AddMissingIndexesToAttachments: migrating =================================
- -- add_index(:attachments, [:container_id, :container_type])
- -> 0.0559s
- -- add_index(:attachments, :author_id)
- -> 0.0499s
- == AddMissingIndexesToAttachments: migrated (0.1062s) ========================
- == AddMissingIndexesToWikiContents: migrating ================================
- -- add_index(:wiki_contents, :author_id)
- -> 0.0688s
- == AddMissingIndexesToWikiContents: migrated (0.0690s) =======================
- == AddMissingIndexesToCustomValues: migrating ================================
- -- add_index(:custom_values, :custom_field_id)
- -> 0.0781s
- == AddMissingIndexesToCustomValues: migrated (0.0783s) =======================
- == AddMissingIndexesToJournals: migrating ====================================
- -- add_index(:journals, :user_id)
- -> 0.5191s
- -- add_index(:journals, :journalized_id)
- -> 0.3245s
- == AddMissingIndexesToJournals: migrated (0.8440s) ===========================
- == AddMissingIndexesToIssueRelations: migrating ==============================
- -- add_index(:issue_relations, :issue_from_id)
- -> 0.0472s
- -- add_index(:issue_relations, :issue_to_id)
- -> 0.0444s
- == AddMissingIndexesToIssueRelations: migrated (0.0920s) =====================
- == AddMissingIndexesToWikiRedirects: migrating ===============================
- -- add_index(:wiki_redirects, :wiki_id)
- -> 0.0364s
- == AddMissingIndexesToWikiRedirects: migrated (0.0367s) ======================
- == AddMissingIndexesToCustomFieldsTrackers: migrating ========================
- -- add_index(:custom_fields_trackers, [:custom_field_id, :tracker_id])
- -> 0.0175s
- == AddMissingIndexesToCustomFieldsTrackers: migrated (0.0178s) ===============
- == AddActivityIndexes: migrating =============================================
- -- add_index(:journals, :created_on)
- -> 0.8118s
- -- add_index(:changesets, :committed_on)
- -> 0.7592s
- -- add_index(:wiki_content_versions, :updated_on)
- -> 0.5959s
- -- add_index(:messages, :created_on)
- -> 0.0696s
- -- add_index(:issues, :created_on)
- -> 0.4423s
- -- add_index(:news, :created_on)
- -> 0.0747s
- -- add_index(:attachments, :created_on)
- -> 0.0190s
- -- add_index(:documents, :created_on)
- -> 0.0290s
- -- add_index(:time_entries, :created_on)
- -> 0.0275s
- == AddActivityIndexes: migrated (2.8308s) ====================================
- == AddVersionsStatus: migrating ==============================================
- -- add_column(:versions, :status, :string, {:default=>"open"})
- -> 0.0121s
- == AddVersionsStatus: migrated (0.0132s) =====================================
- == AddViewIssuesPermission: migrating ========================================
- == AddViewIssuesPermission: migrated (0.0798s) ===============================
- == AddDefaultDoneRatioToIssueStatus: migrating ===============================
- -- add_column(:issue_statuses, :default_done_ratio, :integer)
- -> 0.0507s
- == AddDefaultDoneRatioToIssueStatus: migrated (0.0510s) ======================
- == AddVersionsSharing: migrating =============================================
- -- add_column(:versions, :sharing, :string, {:null=>false, :default=>"none"})
- -> 0.0140s
- -- add_index(:versions, :sharing)
- -> 0.0228s
- == AddVersionsSharing: migrated (0.0373s) ====================================
- == AddLftAndRgtIndexesToProjects: migrating ==================================
- -- add_index(:projects, :lft)
- -> 0.0215s
- -- add_index(:projects, :rgt)
- -> 0.0873s
- == AddLftAndRgtIndexesToProjects: migrated (0.1093s) =========================
- == AddIndexToSettingsName: migrating =========================================
- -- add_index(:settings, :name)
- -> 0.0838s
- == AddIndexToSettingsName: migrated (0.0840s) ================================
- == AddIndexesToIssueStatus: migrating ========================================
- -- add_index(:issue_statuses, :position)
- -> 0.0357s
- -- add_index(:issue_statuses, :is_closed)
- -> 0.0412s
- -- add_index(:issue_statuses, :is_default)
- -> 0.0371s
- == AddIndexesToIssueStatus: migrated (0.1147s) ===============================
- == RemoveEnumerationsOpt: migrating ==========================================
- -- remove_column(:enumerations, :opt)
- -> 0.0289s
- == RemoveEnumerationsOpt: migrated (0.0291s) =================================
- == ChangeWikiContentsTextLimit: migrating ====================================
- -- change_column(:wiki_contents, :text, :text, {:limit=>16777216})
- -> 0.0773s
- -- change_column(:wiki_content_versions, :data, :binary, {:limit=>16777216})
- -> 0.2429s
- == ChangeWikiContentsTextLimit: migrated (0.3208s) ===========================
- == AddIndexOnChangesetsScmid: migrating ======================================
- -- add_index(:changesets, [:repository_id, :scmid], {:name=>:changesets_repos_scmid})
- -> 1.0247s
- == AddIndexOnChangesetsScmid: migrated (1.0250s) =============================
- [web@dev devredmine]$
As you can see there were a ton of changes that needed to be migrated but after removing the actionwebservice plugin there were no further issues.
Thank you so much for this post, I made the same mistake. :D
Hello r2p2,
No problem. Thank you for taking the time to leave feedback.
Thanks.
alex