@@ -560,13 +560,8 @@ together. But, it's not that hard.
560
560
Resque Dependencies
561
561
-------------------
562
562
563
- gem install redis redis-namespace yajl-ruby vegas sinatra
564
-
565
- If you cannot install ` yajl-ruby ` (JRuby?), you can install the ` json `
566
- gem and Resque will use it instead.
567
-
568
- When problems arise, make sure you have the newest versions of the
569
- ` redis ` and ` redis-namespace ` gems.
563
+ $ gem install bundler
564
+ $ bundle install
570
565
571
566
572
567
Installing Resque
@@ -606,7 +601,7 @@ Alternately you can define a `resque:setup` hook in your Rakefile if you
606
601
don't want to load your app every time rake runs.
607
602
608
603
609
- ### In a Rails app, as a gem
604
+ ### In a Rails 2.x app, as a gem
610
605
611
606
First install the gem.
612
607
@@ -637,7 +632,7 @@ Don't forget you can define a `resque:setup` hook in
637
632
` lib/tasks/whatever.rake ` that loads the ` environment ` task every time.
638
633
639
634
640
- ### In a Rails app, as a plugin
635
+ ### In a Rails 2.x app, as a plugin
641
636
642
637
$ ./script/plugin install git://github.com/defunkt/resque
643
638
@@ -652,6 +647,40 @@ Don't forget you can define a `resque:setup` hook in
652
647
` lib/tasks/whatever.rake ` that loads the ` environment ` task every time.
653
648
654
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
+
655
684
Configuration
656
685
-------------
657
686
0 commit comments