Skip to content

Instantly share code, notes, and snippets.

@parndt
Created November 22, 2010 03:58
Show Gist options
  • Save parndt/709496 to your computer and use it in GitHub Desktop.
Save parndt/709496 to your computer and use it in GitHub Desktop.
Upgrading from Refinery CMS 0.9.8.5 to git master (0.9.9.pre)
## MAKE SURE YOU BACKUP FIRST - THIS PROCESS WILL WIPE YOUR DEVELOPMENT DATABASE
## e.g. using git source control and database sql export.
## This is not for people who don't want to have to do some manual work
## getting everything working.
## This also is not officially "supported" but we will hopefully
## be able to write an upgrade task later on based on feedback.
## Notable files that get overriden:
# CSS: (put yours back afterwards but remove any @import for refinery css)
## public/stylesheets/application.css
## public/stylesheets/formatting.css
## public/stylesheets/home.css
# Important changed files: (you need the latest versions we install but
# move over any changes you have in yours to the newly generated ones afterwards)
## config/routes.rb
## config/application.rb
## app/views/layouts/application.html.erb
## Gemfile
## ALSO NOTE: There are rather drastic changes to the HTML to better support HTML5.
## This means your CSS may have to change and if you have things overriden you will
## need to check them!
# first get the latest rails (3.0.3 at time of writing) -- thanks mattmate
gem install rails --version 3.0.3
# Now make sure bundler is up to date. Ideally remove any older versions of bundler.
# (Use the 'All versions' option if prompted) -- thanks mattmate
gem uninstall bundler
# After that's uninstalled, install the latest known good version
gem install bundler --version 1.0.7
# Delete the existing Gemfile.lock file in your application's directory, e.g.:
rm /path/to/your/0985application/Gemfile.lock
# Now, go into a directory that you can clone our RefineryCMS repository into
cd /somewhere
git clone git://github.com/resolve/refinerycms.git
# Without going into the directory, run the installer from within it
# and specify the path to your application.
## NOTE: Make sure to specify the database adapter you'll actually be using
## by replacing sqlite3 with it below (e.g. mysql, postgresql) -- thanks mattmate
ruby ./refinerycms/bin/refinerycms /path/to/your/0985application --force --update -d sqlite3
# This will invoke the installer which should succeed, if not let us know and why.
# Now:
cd /path/to/your/0985application
# What you need to look for in your project:
<% content_for :head do %>
# anything to do with stylesheets
<% end %>
# Modify this to:
<% content_for :stylesheets do %>
# your stylesheets
<% end %>
# And:
<% content_for :head_libraries do %>
# anything to do with javascript libraries
<% end %>
# Modify this to:
<% content_for :javascript_libraries do %>
# your javascript libraries
<% end %>
# And:
<% content_for :head do %>
# anything to do with javascripts
<% end %>
# Modify this to:
<% content_for :javascripts do %>
# your javascripts
<% end %>
# And:
<% content_for :head do %>
# anything to do with meta tags
<% end %>
# Modify this to:
<% content_for :meta do %>
# your meta tags
<% end %>
# If you're still an unhappy camper we'd love to get your feedback on:
# a) what you did
# b) what went wrong
# c) any helpful suggestions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment