Skip to content

Commit 1f1ff49

Browse files
mrduncandefunkt
authored andcommitted
Adding install instructions for Rails 3
1 parent 2764529 commit 1f1ff49

File tree

1 file changed

+36
-2
lines changed

1 file changed

+36
-2
lines changed

README.markdown

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ Alternately you can define a `resque:setup` hook in your Rakefile if you
601601
don't want to load your app every time rake runs.
602602

603603

604-
### In a Rails app, as a gem
604+
### In a Rails 2.x app, as a gem
605605

606606
First install the gem.
607607

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

634634

635-
### In a Rails app, as a plugin
635+
### In a Rails 2.x app, as a plugin
636636

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

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

649649

650+
### In a Rails 3 app, as a gem
651+
652+
First include it in your Gemfile.
653+
654+
$ cat Gemfile
655+
...
656+
gem 'resque'
657+
...
658+
659+
Next install it with Bundler.
660+
661+
$ bundle install
662+
663+
Now start your application:
664+
665+
$ rails server
666+
667+
That's it! You can now create Resque jobs from within your app.
668+
669+
To start a worker, add this to a file in `lib/tasks` (ex:
670+
`lib/tasks/resque.rake`):
671+
672+
``` ruby
673+
require 'resque/tasks'
674+
```
675+
676+
Now:
677+
678+
$ QUEUE=* rake environment resque:work
679+
680+
Don't forget you can define a `resque:setup` hook in
681+
`lib/tasks/whatever.rake` that loads the `environment` task every time.
682+
683+
650684
Configuration
651685
-------------
652686

0 commit comments

Comments
 (0)