Skip to content

Commit

Permalink
Adding install instructions for Rails 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mrduncan authored and defunkt committed Jul 14, 2011
1 parent 2764529 commit 1f1ff49
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions README.markdown
Expand Up @@ -601,7 +601,7 @@ Alternately you can define a `resque:setup` hook in your Rakefile if you
don't want to load your app every time rake runs.


### In a Rails app, as a gem
### In a Rails 2.x app, as a gem

First install the gem.

Expand Down Expand Up @@ -632,7 +632,7 @@ Don't forget you can define a `resque:setup` hook in
`lib/tasks/whatever.rake` that loads the `environment` task every time.


### In a Rails app, as a plugin
### In a Rails 2.x app, as a plugin

$ ./script/plugin install git://github.com/defunkt/resque

Expand All @@ -647,6 +647,40 @@ Don't forget you can define a `resque:setup` hook in
`lib/tasks/whatever.rake` that loads the `environment` task every time.


### In a Rails 3 app, as a gem

First include it in your Gemfile.

$ cat Gemfile
...
gem 'resque'
...

Next install it with Bundler.

$ bundle install

Now start your application:

$ rails server

That's it! You can now create Resque jobs from within your app.

To start a worker, add this to a file in `lib/tasks` (ex:
`lib/tasks/resque.rake`):

``` ruby
require 'resque/tasks'
```

Now:

$ QUEUE=* rake environment resque:work

Don't forget you can define a `resque:setup` hook in
`lib/tasks/whatever.rake` that loads the `environment` task every time.


Configuration
-------------

Expand Down

0 comments on commit 1f1ff49

Please sign in to comment.