1.1 to 1.2

After working out a lot of kinks and reorganizing the structure of the app in v1.1, the upgrade to v1.2 is easy.

Upgrade Server (production)

If you are upgrading your production server, first ssh into the server. And it's always good practice to get your server up to date first.

$ sudo apt-get update
$ sudo apt-get upgrade -y

Update Code

Change into your Sapwood project directory. Remember, this is different depending on your setup.

$ cd ~/apps/sapwood

Upgrade your code to the latest release.

$ git checkout release
$ git pull origin release

Then install any new gems.

$ bundle install

Transition Content (production)

First, back up your database before we go any farther (you can also do this through the UI).

$ RAILS_ENV=production bundle exec rake sapwood:db:backup

Then migrate your database.

$ RAILS_ENV=production bundle exec rake db:migrate

Last, you can run the auto-update rake task, which transitions some content smoothly from v1.1.

$ RAILS_ENV=production bundle exec rake sapwood:update:one_two

Precompile Assets

If you are in production, you'll need to update your content and precompile your assets. Note: You can also run this in development if you aren't going to develop for Sapwood.

$ RAILS_ENV=production bundle exec rake assets:precompile

New Settings

A few settings we added to your config/sapwood.yml file, so make sure that is up to date.


  secret:             ''                  # some random hash
  host:               ''                  # your asset host (with protocol)
  max_file_size:      4.0                 # maximum size (in MB) for upload
  analytics_id:       ''                  # google analytics ID (for builder traffic only)

And if you take a look at config/sapwood.sample.yml, you'll see you can also get rid of a few settings. Most important are your AWS S3 settings.

Restart Server

Then stop and start your server (this is better than restarting in this case). In development, this is:

$ bundle exec rails s

In production:

$ sudo service unicorn_taproot stop
$ sudo service unicorn_taproot start

Now you should be up and running!