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
2
Answers
My problem is solved with help of THIS.
I use
bundle exec rake db:migrate RAILS_ENV=production
instead ofsudo ruby bin/rake db:migrate RAILS_ENV=production
.Bitnami Engineer here.
Please remember to load the Bitnami Environment before running any command in the installation. This way, you will ensure that you use the correct binaries when performing the operations.
You can run these commands to load the Bitnami Environment
https://docs.bitnami.com/installer/how-to/understand-bnconsole/
Once you do that, you can start to follow the steps in our guide to upgrade the app.