Services:Installation
From MacroDeckDevWiki
- Copy the vendor directory to your Rails environment.
- Copy the db directory to your Rails environment, overwriting any files already there, unless you know that's a bad idea (i.e. if you have your own database schema). If this IS the case, read the information below in "Installing Database Schema".
- Install the database schema. If it's a fresh environment or the environment is without a database schema, run "rake db:migrate". Otherwise, see "Installing Database Schema".
- Add
Services.startService "service_filename"to config/environment.rb in your Rails environment. See vendor/plugins/services/lib for a list of files. Omit the extension and only start services ending in _service. - Boot your Rails environment!
[edit]
Installing Database Schema
If your database schema is blank, or if it's a fresh environment, just run "rake db:migrate" (without the quotes). Otherwise, read on...
- You need to run our migrations on your data. This tutorial assumes that you've built your existing schema with migrations. To start, copy the db/migrate directory somewhere.
- Browse to your application's db/migrate directory. Figure out the last migration you have (the number). If your last migration is 050_upgrade_users.rb, the number you're looking for is 050.
- Go to the place you just extracted the files. Rename all of the migrations here to go right after your last migration. In our example, the Services 001 will become 051, the 002 will become 052, and so on. Do this for all of them.
- Copy the renamed migrations into your application's migrate directory.
- Run "rake db:migrate" without the quotes.

