-
Notifications
You must be signed in to change notification settings - Fork 124
Installing
Like any gem, you can install Forgery two ways depending on it's use.
For normal Ruby development, you need simply use:
$ gem install forgery
This will add it to your gem library, just like any normal gem. You can then use it like any normal gem library. See examples for more.
If you're using Rails 3.x you need to do a few extra things (that are probably rote).
First step is to add it to your Rails.root/Gemfile
, we also suggest specifying the latest version (found on rubygems):
group [:development, :test] do
gem 'forgery', '0.3.12'
end
Then you'll need to run bundle install
to install and lock in your new gem.
Next you'll want to run the special Rails 3 generator:
$ [bundle exec] rails generate forgery
For Rails 2.x you'll need to do something a little different, by first editing your Rails.root/config/environment.rb
and adding this to the configuration block:
config.gem 'forgery'
Then you'll need to run this in your command line:
$ script/generate forgery
This Rails generators will make these directories in your Rails.root directory:
- Rails.root/lib/forgery
- Rails.root/lib/forgery/dictionaries
- Rails.root/lib/forgery/extensions
- Rails.root/lib/forgery/forgeries
- Rails.root/lib/forgery/formats
You can then use these directories to write your own dictionaries, class extensions, forgeries, and formats.