-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Rails 2 Installation | ||
|
||
To get HairTrigger working in Rails 2, you need to: | ||
|
||
## Add it to your project | ||
|
||
Put hairtrigger in your Gemfile, or if you're not using bundler, you can | ||
`gem install hairtrigger` and then put hairtrigger in environment.rb | ||
|
||
## Set up a rake task | ||
|
||
Create lib/tasks/hair_trigger.rake with the following: | ||
|
||
```ruby | ||
$VERBOSE = nil | ||
Dir["#{Gem::Specification.find_by_name('hairtrigger').full_gem_path}/lib/tasks/*.rake"].each { |ext| load ext } | ||
``` | ||
|
||
This will give you the `db:generate_trigger_migration` task, and will ensure | ||
that hairtrigger hooks into `db:schema:dump`. | ||
|
||
If you are unpacking the gem in vendor/plugins, this step is not needed | ||
(though you'll then want to delete its Gemfile to avoid possible conflicts). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters