Upgrading from CE v1.0.0 to v1.0.2 (desert)
Beginning with CE v.1.0.2, we have started using the Desert gem instead of the Engines plugin. Desert does many of the things the Engines plugin did, but also allows model code mixing. Also, in light of Engine's inclusion into Rails core, it appeared many of the features CE loves about Engines (plugin migrations, asset helpers, code mixing) were going to be dropped.
Upgrading an Engines-based CE app to use the new Desert-based CE is easy:
Modify your environment.rb as indicated in step #6 of README.markdown.
Delete the engines plugin directory (
rm -rf vendor/plugins/engines). If you had submoduled it, make sure to delete the submodule info as well:
Delete the relevant line from the .gitmodules file. Delete the relevant section from .git/config. Run git rm --cached vendor/plugins/engines (no trailing slash). Run rm -rf vendor/plugins/engines Commit your changes
rake:rails:update(coming from anything < Rails 2.3)
Update your app's
If you have old migrations from the Engines-based CE, you may experience some problems if you try to migrate your db from version 0. That's because the old plugin migrations used the
Engines.plugins["community_engine"].migrate(version_number) format. You'll need to replace all those with
Here's a regex that might help you in doing that:
Also, you need to run
rake community_engine:db:migrate:upgrade_desert_plugin_migrations before you migrate any new CE migrations, to ensure your plugin migrations are listed in the correct table. Please note that you'll have to do this (carefully, and with backups) in production as well. Please post any questions to the CE Google Group.