Skip to content

Upgrading a BrowserCMS project

peakpg edited this page Mar 19, 2012 · 33 revisions

Prerequisites

  1. This guide assumes you are upgrading a BrowserCMS project to 3.4.x from 3.3.x. (See a list of instructions for older versions.
  2. It assumes the project is currently running on Rails 3.0 and will be updated to Rails 3.1 as part of this process.
  3. The project being managed using Git (or other SCM)

Instructions

1. Install the new BrowserCMS Gem

Ensure you have the correct version:

$ bcms -v

Should return BrowserCMS 3.4.0 or some other 3.4.x version.

3. Run upgrade script

In your project, run the following script from the command line:

$ bcms upgrade # Type 'a' when prompted

During the update, a rake task to upgrade rails will be run, and you will be prompted to overwrite some files. Enter 'a' when prompted to overwrite all the files. This will update the project to use the new version of the gem, add new migrations and seed data as needed. Then do the following:

  1. Review the following files and ensure the specified lines appear (use Git to selectively discard the changes):
config/environment/development.rb => Should contain:
  SITE_DOMAIN=localhost:3000
config/environment/production.rb => Should contain:
  SITE_DOMAIN=http://your-site-domain.com
  config.action_controller.page_cache_directory = File.join(Rails.root, 'public', 'cache')
  config.action_mailer.smtp_settings = {:address => 'mail.yourmailserver.com', :domain => "#{SITE_DOMAIN}"}
config/environment/test.rb => Should contain:
  SITE_DOMAIN=localhost:3000
  1. Run git checkout config/routes.rb to revert this file
  2. Run rake db:migrate to migrate the database
  3. Edit the db/seeds.rb to remove all the BrowserCMS specific seed data calls. It will be duplicative with what is contained in the db/browsercms.seeds.rb file.

Instructions for Older Versions

If you need instructions for how to upgrade earlier versions of BrowserCMS, see the following list:

Troubleshooting

Custom Blocks

As part of this upgrade, a new migration will be generated to 'correct' any custom blocks in your project. Ensure you review db/migrate/*_update_version_id_columns.rb to ensure it's correcting the right tables.

Clone this wiki locally