@@ -601,7 +601,7 @@ Alternately you can define a `resque:setup` hook in your Rakefile if you
601
601
don't want to load your app every time rake runs.
602
602
603
603
604
- ### In a Rails app, as a gem
604
+ ### In a Rails 2.x app, as a gem
605
605
606
606
First install the gem.
607
607
@@ -632,7 +632,7 @@ Don't forget you can define a `resque:setup` hook in
632
632
` lib/tasks/whatever.rake ` that loads the ` environment ` task every time.
633
633
634
634
635
- ### In a Rails app, as a plugin
635
+ ### In a Rails 2.x app, as a plugin
636
636
637
637
$ ./script/plugin install git://github.com/defunkt/resque
638
638
@@ -647,6 +647,40 @@ Don't forget you can define a `resque:setup` hook in
647
647
` lib/tasks/whatever.rake ` that loads the ` environment ` task every time.
648
648
649
649
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
+
650
684
Configuration
651
685
-------------
652
686
0 commit comments