Project

General

Profile

Actions

Defect #40081

closed

Redmine 5.1.1

Added by Evgeniy Lev 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

After updating Redmine 5.0.7 on Redmine 5.1.1, problems began with the bundle due to which it is not possible to remove any plugin, in addition, every time you run the installation bundle, a message is displayed stating that the gemfile contains a gem that is repeated several times, which in the future can cause Problems. After I failed to achieve results in the product environment, I deployed the installation from 0. I used the following installation algorithm for Ubuntu 22.04.3 LTS minimal:
*under root user
1) apt update
2) apt upgrade
3) useradd r -m -d /opt/redmine -s /usr/bin/bash redmine
4) usermod -aG redmine www-data
5) apt install build-essential ruby-dev libxslt1-dev libmariadb-dev libxml2-dev zlib1g-dev imagemagick libmagickwand-dev curl gnupg2 bison libbison-dev libgdbm-dev libncurses-dev libncurses5-dev libreadline-dev libssl-dev libyaml-dev postgresql libpq-dev -y
6) apt install apache2 libapache2-mod-passenger
7) systemctl enable --now apache2
8) Postgres
su - postgres
- createuser redmine
- createdb redmine O redmine
psql c "alter user redmine with password 'redmine'"
exit
9) curl -s https://www.redmine.org/releases/redmine-5.1.1.tar.gz | sudo -u redmine tar xz -C /opt/redmine/ --strip-components=1

*under the redmine user
10) cp /opt/redmine/config/configuration.yml{.example,}
cp /opt/redmine/public/dispatch.fcgi{.example,}
cp /opt/redmine/config/database.yml{.example,}
11) nano /opt/redmine/config/database.yml
production:
adapter: postgresql
database: redmine
host: localhost
username: redmine
password: "redmine"
encoding: utf8
- Comment out the remaining lines of the file

*under the root user, located in the cd /opt/redmine directory, install bundler
12) gem install bundler

*under the redmine user in the folder cd /opt/redmine
13) bundle config set --local path 'vendor/bundle'
14) bundle install
15) bundle update
16) gem install io-wait strscan webrick --user-install
17) bundle exec rake generate_secret_token
18) RAILS_ENV=production bundle exec rake db:migrate
19) RAILS_ENV=production REDMINE_LANG=ru bundle exec rake redmine:load_default_data
20) for i in tmp tmp/pdf public/plugin_assets; do [ -d $i ] || mkdir -p $i; done
20) chown -R redmine:redmine files log tmp public/plugin_assets
21) chmod -R 755 /opt/redmine

*under the root user in the directory cd /opt/redmine
22)
cat > /etc/apache2/sites-available/redmine.conf << 'EOL'
Listen 3000
<VirtualHost *:80>
ServerName localhost
RailsEnv production
DocumentRoot /opt/redmine/public

<Directory "/opt/redmine/public">
Allow from all
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/redmine_error.log
CustomLog ${APACHE_LOG_DIR}/redmine_access.log combined
</VirtualHost>
EOL

23) a2enmod passenger
24) a2ensite redmine
25) a2dissite 000-default.conf
26) systemctl restart apache2
This completes the installation of Redmine 5.1.1. completed!!!

*under the redmine user
I copy the plugins to the /opt/redmin/plugins folder and install them using the following algorithm:
1) bundle install
2) bundle exec rake redmine:plugins NAME=redmine_agile RAILS_ENV=production
*under root user
3) systemctl restart apache2
I copy the second redmine_budget plugin
4) bundle install
Shows the following warning:
Your Gemfile lists the gem redmine_crm (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Bundle complete! 43 Gemfile dependencies, 105 gems now installed.
Bundled gems are installed into `./vendor/bundle`
5) bundle exec rake redmine:plugins NAME=redmine_budgets RAILS_ENV=production
*under root user
6) systemctl restart apache2
Redmine is functioning, the plugins are displayed and everything seems to be fine, but when you try to remove the plugin an error appears:
redmine@xxx :~$ rake redmine:plugins:migrate NAME=redmine_budgets VERSION=0 RAILS_ENV=productionrake aborted!
Gem::LoadError: You have already activated rake 13.0.6, but your Gemfile requires rake 13.1.0. Prepending `bundle exec` to your command may solve this.
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/runtime.rb:304:in `check_for_activated_spec!'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/runtime.rb:25:in `block in setup'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/spec_set.rb:191:in `each'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/spec_set.rb:191:in `each'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/runtime.rb:24:in `map'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/runtime.rb:24:in `setup'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler.rb:162:in `setup'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/setup.rb:10:in `block in <top (required)>'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/ui/shell.rb:159:in `with_level'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/ui/shell.rb:111:in `silence'
/var/lib/gems/3.0.0/gems/bundler-2.5.4/lib/bundler/setup.rb:10:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/redmine/config/boot.rb:6:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/redmine/config/application.rb:3:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/redmine/Rakefile:5:in `<top (required)>'
/usr/share/rubygems-integration/all/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
(See full trace by running task with

These problems appear both on a server in a product environment that was updated from Redmini 5.0.7 to 5.1.1, and on a clean installation of Redmini 5.1.1.
It will tell me what I'm doing wrong... my algorithm was tested on previous versions many times Redmine 5.0.0 and higher and only 5.1.1 problems appeared.

I ask for speedy help from experts((((

Actions #1

Updated by Holger Just 4 months ago

  • Status changed from New to Closed
  • Resolution set to Invalid

This is not defect in Redmine. Please use the forums to ask for usage questions next time.

As for your specific error, use bundle exec rake instead of just rake to make sure that the right rake version is loaded by bundler, just as was helpfully recommended by the error message itself.

Actions

Also available in: Atom PDF