Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move rake task to lib and update directions for installing delayed_jo…

…b as a gem
  • Loading branch information...
commit 491a5642abb58704bac8bcebd1491d97b33c00a4 1 parent 4d76b8d
@bkeepers bkeepers authored
View
24 README.textile
@@ -14,8 +14,32 @@ It is a direct extraction from Shopify where the job table is responsible for a
h2. Installation
+To install as a gem, add the following to @config/environment.rb@:
+
+<pre>
+config.gem 'collectiveidea-delayed_job', :lib => 'delayed_job',
+ :source => 'http://gems.github.com'
+</pre>
+
+Rake tasks are not automatically loaded from gems, so you'll need to add the following to your Rakefile:
+
+<pre>
+begin
+ require 'delayed/tasks'
+rescue LoadError
+ STDERR.puts "Run `rake gems:install` to install delayed_job"
+end
+</pre>
+
+To install as a plugin:
+
<pre>
script/plugin install git://github.com/collectiveidea/delayed_job.git
+</pre>
+
+After delayed_job is installed, run:
+
+<pre>
script/generate delayed_job
rake db:migrate
</pre>
View
0  tasks/tasks.rb → lib/delayed/tasks.rb
File renamed without changes
View
2  lib/delayed_job.rb
@@ -9,5 +9,5 @@
Module.send(:include, Delayed::MessageSending::ClassMethods)
if defined?(Merb::Plugins)
- Merb::Plugins.add_rakefiles File.dirname(__FILE__) / '..' / 'tasks' / 'tasks'
+ Merb::Plugins.add_rakefiles File.dirname(__FILE__) / 'delayed' / 'tasks'
end
View
2  tasks/jobs.rake
@@ -1 +1 @@
-require File.join(File.dirname(__FILE__), 'tasks')
+require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'delayed', 'tasks'))
Please sign in to comment.
Something went wrong with that request. Please try again.