Search code examples
ruby-on-railsrubycentos7redminebitnami

Migration failed on upgrade Bitnami Redmine


I did upgrade my Redmine (version 4.1.0) to last version (4.1.1.7) through THIS instruction. All was ok until i wanted to migrate database. Once i entered sudo ruby bin/rake db:migrate RAILS_ENV=production' command the following error occured :

Activating bundler (~> 2.1)
Could not find 'bundler' (~> 2.1) among 5 total gem(s)
To install the version of bundler this project requires, run gem install bundler -v '~> 2.1'

Then i try gem install bundler -v '~> 2.1' :

Fetching: bundler-2.2.5.gem (100%)
Successfully installed bundler-2.2.5
Parsing documentation for bundler-2.2.5
Installing ri documentation for bundler-2.2.5
Done installing documentation for bundler after 46 seconds
Done installing documentation for bundler after 46 seconds

and ran sudo ruby bin/rake db:migrate RAILS_ENV=production again but same error occured.

My platform is Centos 7

Thanks


Solution

  • My problem is solved with help of THIS.

    I use bundle exec rake db:migrate RAILS_ENV=production instead of sudo ruby bin/rake db:migrate RAILS_ENV=production.