Content
Problem with plugins order on the latest 4.1 setup
Added by Denis Lamotte over 9 years ago
i am upgrading to ruby 2.1.5 and successfully followed the https://www.openproject.org/open-source/manual-installation/latest-upgrade-guide/ guide till the migration.
I decide to scrap the database with the following plugin list:
gem “prawn”
gem “pdf-inspector”, “~>1.0.0”
gem “openproject-pdf_export”, :git => “https://github.com/finnlabs/openproject-pdf_export.git”, :branch => “stable”
gem “openproject-costs”, :git => “https://github.com/finnlabs/openproject-costs.git”, :branch => “stable”
gem “openproject-meeting”, :git => “https://github.com/finnlabs/openproject-meeting.git”, :branch => “stable”
gem “openproject-global_roles”, :git => “https://github.com/finnlabs/openproject-global_roles.git”, :branch => “stable”
gem “reporting_engine”, git: “https://github.com/finnlabs/reporting_engine.git”, :branch => “stable”
gem “openproject-reporting”, :git => “https://github.com/finnlabs/openproject-reporting.git”, :branch => “stable”
gem ‘openproject-help_link’, :git => ‘https://github.com/finnlabs/openproject-help_link.git’, :branch => ‘stable’
gem ‘openproject-translations’, :git => ‘https://github.com/opf/openproject-translations.git’, :branch => ‘stable’
gem ‘openproject-documents’, :git => ‘https://github.com/opf/openproject-documents.git’, :branch => ‘stable’
gem ‘openproject-my_project_page’, :git => ‘https://github.com/finnlabs/openproject-my_project_page.git’, :branch => ‘stable’
gem “openproject-backlogs”, :git => “https://github.com/finnlabs/openproject-backlogs.git”, :branch => “stable”
bundle exec rake db:migrate give me:
NameError: uninitialized constant API::V3::Users::UserModel
[path]/vendor/bundle/ruby/2.1.0/bundler/gems/openproject-costs-995528824c2b/lib/api/v3/cost_objects/cost_object_representer.rb:51:in `class:CostObjectRepresenter’
[path]/vendor/bundle/ruby/2.1.0/bundler/gems/openproject-costs-995528824c2b/lib/api/v3/cost_objects/cost_object_representer.rb:26:in `module:CostObjects’
[path]/vendor/bundle/ruby/2.1.0/bundler/gems/openproject-costs-995528824c2b/lib/api/v3/cost_objects/cost_object_representer.rb:25:in `module:V3’
[path]/vendor/bundle/ruby/2.1.0/bundler/gems/openproject-costs-995528824c2b/lib/api/v3/cost_objects/cost_object_representer.rb:24:in `module:API’
[path]/vendor/bundle/ruby/2.1.0/bundler/gems/openproject-costs-995528824c2b/lib/api/v3/cost_objects/cost_object_representer.rb:23:in `<top (required)>’
[path]/vendor/bundle/ruby/2.1.0/bundler/gems/openproject-costs-995528824c2b/lib/open_project/costs/engine.rb:129:in `block in class:Engine’
[path]/lib/open_project/plugins/acts_as_op_engine.rb:168:in `instance_eval’
[path]/lib/open_project/plugins/acts_as_op_engine.rb:168:in `block (2 levels) in included’
i try different order like
gem “prawn”
gem “pdf-inspector”, “~>1.0.0”
gem “openproject-meeting”, :git => “https://github.com/finnlabs/openproject-meeting.git”, :branch => “stable”
gem ‘openproject-help_link’, :git => ‘https://github.com/finnlabs/openproject-help_link.git’, :branch => ‘stable’
gem ‘openproject-translations’, :git => ‘https://github.com/opf/openproject-translations.git’, :branch => ‘stable’
gem ‘openproject-my_project_page’, :git => ‘https://github.com/finnlabs/openproject-my_project_page.git’, :branch => ‘stable’
gem ‘openproject-global_roles’, :git => ‘https://github.com/finnlabs/openproject-global_roles.git’, :branch => ‘stable’
gem ‘openproject-documents’, :git => ‘https://github.com/opf/openproject-documents.git’, :branch => ‘stable’
gem ‘reporting_engine’, :git => ‘https://github.com/finnlabs/reporting_engine.git’, :branch => ‘stable’
gem ‘openproject-costs’, :git => ‘https://github.com/finnlabs/openproject-costs.git’, :branch => ‘stable’
gem ‘openproject-reporting’, :git => ‘https://github.com/finnlabs/openproject-reporting.git’, :branch => ‘stable’
gem “openproject-pdf_export”, git: “https://github.com/finnlabs/openproject-pdf_export.git”, :branch => “stable”
gem “openproject-backlogs”, git: “https://github.com/finnlabs/openproject-backlogs.git”, :branch => “stable”
but RAILS_ENV=“production” bundle exec rake db:drop db:create db:migrate gives me a new error:
TypeError: superclass must be a Class (ActiveSupport::Deprecation::DeprecatedConstantProxy given)
[path]/vendor/bundle/ruby/2.1.0/bundler/gems/openproject-global_roles-03f3290039de/lib/open_project/global_roles/principal_allowance_evaluator/global.rb:20:in `<top (required)>’
and i try to vary different vintage order but never get something working
in the previous post https://community.openproject.org/topics/4568 , Jan speak of mixing version but does it works for openproject 4.1 core ?
—————————————————————
the problem originates from a version mismatch between the costs plugin and your OpenProject core.
unfortunately the current stable version of the costs plugin (which is 4.0.10) is not compatible with OpenProject core 4.0.8.
The fix should be easy, you have two options:
Upgrade your OpenProject core to at least 4.0.10.
Replace the version used in your Gemfile.plugins by v4.0.8.
You should reference OpenProject plugins explicitly by their version number to avoid such kinds of mismatches. OpenProject plugins follow the corresponding core version in lock step.
For a core of 4.0.8 your Gemfile.plugins should probably look like this:
CORE_VERSION = ‘v4.0.8’
gem “openproject-pdf_export”, git: “https://github.com/finnlabs/openproject-pdf_export.git”, :commit => CORE_VERSION
gem ‘openproject-my_project_page’, :git => ‘https://github.com/finnlabs/openproject-my_project_page.git’, :commit => CORE_VERSION
gem ‘openproject-global_roles’, :git => ‘https://github.com/finnlabs/openproject-global_roles.git’, :commit=> CORE_VERSION
gem ‘openproject-documents’, :git => ‘https://github.com/opf/openproject-documents.git’, :commit => CORE_VERSION
gem ‘reporting_engine’, :git => ‘https://github.com/finnlabs/reporting_engine.git’, :branch => ‘release/1.0’ #the reporting engine plugin is special…
gem ‘openproject-costs’, :git => ‘https://github.com/finnlabs/openproject-costs.git’, :commit => CORE_VERSION
gem ‘openproject-reporting’, :git => ‘https://github.com/finnlabs/openproject-reporting.git’, :commit => CORE_VERSION
gem “openproject-backlogs”, git: “https://github.com/finnlabs/openproject-backlogs.git”, :commit => CORE_VERSION
The reporting engine plugin is the only exception here, because the initial thought was that it could be reused independently of OpenProject and would therefore follow its own versioning scheme.
I can’t really give you any better advice than that:
For OpenProject 4.0.x use release/1.0 of the reporting engine.
For all later versions use the dev branch of the reporting engine.
—————————————————————————————————————————-
Best regards