Upgrading Redmine from 3.0.7 to 3.2.0 - redmine

I am trying to upgrade my Redmine 3.0.7 that was installed from the oneclick install to the newest stable version, 3.2.0. However, when I try to run svn update, it says it is updated, but doesn't show as updated in the info on the site. I tried to follow the information here:
You can checkout the latest stable source with one of the following commands:
Subversion
svn co https://svn.redmine.org/redmine/branches/3.2-stable redmine-3.2
It will create a directory named redmine-3.2 and you'll be able to update your Redmine copy using svn update in this directory.
The information from the info page on the admin section of my redmine:
Environment:
Redmine version 3.0.7.stable.15164
Ruby version 2.0.0-p643 (2015-02-25) [x86_64-linux]
Rails version 4.2.3
Environment production
Database adapter Mysql2
SCM:
Subversion 1.8.8
Filesystem
Redmine plugins:
no plugin installed
But it didn't work. Any help would be much appreciated.

In order to upgrade to a newer version of Redmine, specifically 3.2, you will need to switch to the 3.2-stable SVN branch and then perform the upgrade.
First off, I would recommend taking a snapshot of your Droplet so that you have a working state that you can restore in case anything goes wrong with the upgrade. If you can't power off your Droplet to take a snapshot, you can back up the files and settings manually. All uploaded files should be stored in /srv/redmine/files. The database can be backed up by running the following command:
mysqldump -u root redmine | gzip > ~/redmine_db_backup.sql.gz
Then, switch to the newer SVN branch:
cd /srv/redmine
svn switch ^/branches/3.2-stable
Make sure all the requires gems are installed and up-to-date:
bundle update
Next, you'll want to upgrade the database as well so that any changes in the database structure are applied to your existing database:
bundle exec rake db:migrate RAILS_ENV=production
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
Finally, clear the cache and restart Passenger. This will log out all users.
bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
touch tmp/restart.txt
You might also want to check out the Admin -> Roles & permissions page for any new permissions.
Let me know if you have any issues. I've just tested it on a Droplet and everything went fine - so I'm hoping that everything will go smoothly for you as well.

Related

AWS Codebuild Installing Upgraded Version of Package but Old Version Still Detected/Used

I have a Django App deployed via AWS' elastic beanstalk, that uses the CodePipeline service to build. As part of that pipeline, the CodeBuild service is used to build the app that gets deployed to the ElasticBeanstalk environment.
The build failed, sending the following error message:
django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).
Per Amazon's own package version listing I realize that is expected given the older version is intended to be on the Amazon Linux 2 distro.
Ok. I wrote a shell script to download the latest version of SQLite and build from scratch, but I'm still getting the same issue.
In the buildspec.yaml file I have the following:
...
post_build:
commands:
- echo "beginning post-build phase..."
- bash get_sqlite.sh
- echo "sqlite version -- $(sqlite3 --version)"
- python manage.py makemigrations
...
In the CodeBuild logs, I can see the result of the echo command as such:
sqlite version -- 3.40.1 2022-12-28
Yet, the build fails and the logs still show the following error:
django.core.exceptions.ImproperlyConfigured: SQLite 3.9.0 or later is required (found 3.7.17).
Any idea what further steps need to be taken for the updated version to be detected rather than the previous one?
I think you need to move your sqlite command to bin directory in linux.
- mv sqlite /usr/local/bin/
Even though package has been updated but linux reads PATH ( env variable to find the commands ) and still it is finding the old version of the command, that is hwy you need to replace the old sqlite command with the new version in bin directory

How do I update Django on Openshift?

I'm learning to deploy Django on Openshift.
Right now I have a python-2.7 cartridge up and running with Django 1.6
The git repo cloned in the cartridge is,
git://github.com/rancavil/django-openshift-quickstart.git (Github)
How can I update the Django version of a running webapp?
I've looked at this question that just explain about updating a cartridge, while I'm asking about updating the packages inside a cartridge while keeping the cartridge same as python-2.7.
The easiest way to achieve this is to change the setup dependencies (install_requires parameter for setup ()) in setup.py. Instead of
packages = ['Django<=1.6',]
as in the cartridge default you could write
packages = ['Django>=1.7,<1.8',]
to get the latest version of Django 1.7. More details of how to specify values can be found in the Python Packaging User Guide.
With your next git push this file will be executed and the packages get updated, if required.
Warnings!
make sure new version is ok for your app. Django 1.7 brought DB migrations feature, which might break your compatibility. (We had some issues as we used South before that.)
before applying upgrade backup the app instance snapshot (takes time)
Actually git push takes some time while your application will be down.
If you want to shorten the time, you can follow this approach:
ssh into your app openshift server
pip install --upgrade Django==<new version>
That will upgrade django immediately. However the running web process still keeps the older version. So you need to restart python cartridge.
From you local command line:
rhc cartridge restart -a <your app> -c python
Now its running with the new django and the downtime is minimal.
Make sure to update setup.py as mentioned in the other answer in order to be aligned with the next git push.

Django Analytical Google Analytics Display Advertising working on development, staging but not production

Running Django 1.6 and Analytical 0.16.0
I have the following in my settings.py
GOOGLE_ANALYTICS_PROPERTY_ID = env_var('GOOGLE_ANALYTICS_PROPERTY_ID')
GOOGLE_ANALYTICS_DISPLAY_ADVERTISING = True
and the google analytics code shows up as expected when I run the site locally and on the staging server (ie. running the doubleclick dc.js analytics script), however when running on production it still shows the default Google Analytics ga.js script.
It isn't affected by DEBUG being on or off and as I can tell the settings and env are the same on production and staging servers (both runnning on Heroku). Can anyone offer an explanation of why this might be the case?
edit: SOLVED. Turns out I was still running Analytical 0.15.0 on the production server. I had wrongly assumed that heroku automatically installed the latest version if the version wasn't specified in the pip requirements.
Check that Heroku is running the same versions of each program:
heroku pip freeze
It turns out it was still running an old version of django-analytical as the version number wasn't specified in the pip requirements file. Heroku won't upgrade an existing program unless explicitly specified. Changing the requirements.txt to the following solved it.
django-analytical==0.16.0

How to uninstall redmine plugins?

I cannot uninstall the redmine plugin. I typed below as this redmine page describes.
rake redmine:plugins:migrate NAME=plugin_name VERSION=0 RAILS_ENV=production
And remove the plugin from plugin directory. When redmine restarted, it shows error screen. If I put Redmine Bitbucket back to plugin directory, it works again...
I used Redmine Bitbucket. The plugin is good. But I wanted to try uninstall it.
Some new redmine plugins have problem like this?
My redmine version is Redmine 2.1.4.stable.
I solved myself.
The problem is not on this plugin. I just set my Gemfile.lock's owner as root. I changed the ownership. I can remove this plugin. I will try to use this plugin again.
Try this one:
rake db:migrate:plugin NAME=plugin_name VERSION=0 RAILS_ENV=production
try this one ..
rake redmine:plugins:migrate NAME=plugin_name VERSION=0
You can always see a list of rake tasks that come with your Redmine version.
To see them, just navigate to your redmine root and type:
bundle exec rake -T
And there when you scroll you will find list of rake tasks associated with plugins, that way you will always use proper uninstall command.
It's worth noting this:
Note: The rake task db:migrate:plugin has been deprecated, please use the replacement version redmine:plugins:migrate

Spree Starting Server

I cloned the git repository onto a local machine and Amazon Web Services.
I've tried using script/server and rails s
The code is cloned using git://github.com/spree/spree.git
How do you start the server?
I'd rather use the full git so I can ultimately change the template.
Check out the section on the github page under "Working With Edge Source"
https://github.com/spree/spree
Clone the Git repo
git clone git://github.com/spree/spree.git
cd spree
Install the gem dependencies
bundle install
Create a sandbox Rails application for testing purposes (and automatically perform all necessary database setup)
bundle exec rake sandbox
Start the server
cd sandbox
rails server
I just checked it out and it works, but edge currently isn't working. You might just want to fork it and use your own fork as a gem for a standard spree-store set up.