This is the installer that I created for Typo, extracted into its own package so other Rails apps can use it as well. The installer lets users install Typo with only two commands:
$ sudo gem install typo $ typo install /some/path
With a little bit of work, you can get your app to be just as easy to install. New in 0.2.0 is a
rails-app-installer-setup command that will do most of the work for you. Just cd to your project and run
rails-app-installer-setup my-app, and it’ll create a
bin/my-app installer for you, along with some config files and a
lib/tasks/release.rake file that knows how to build a
.gem for you. Just follow the directions that
rails-app-installer-setup gives you and you’ll have a
.gem in no time at all.
Changes for version 0.2.0:
- Added a
rails-app-installer-setupcommand to help set up new apps.
- Made the installer fetch its default version of Rails from the application
.gemdependency, instead of making developers repeat themselves.
- Fixed a restore bug that kept IDs from being restored correctly.
- Added a command-line backup and restore tool that can be used with any Rails app. I’ll talk about it more in another post.
At this point, it’s nearly complete. It needs better documentation, and I’d like to get a bit of feedback from other apps before I call it 1.0, but my to-do list is getting pretty short.