Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add note about requiring rake tasks in Rails 2

  • Loading branch information...
commit 86cc1555aaae469d8526a2efaabba0bef5e48eab 1 parent 2ef609a
@nesquena nesquena authored
View
8 README.md
@@ -31,6 +31,14 @@ All you have to do is install it! Right now this is a fork so assuming you use b
# Gemfile
gem "query_reviewer", :git => "git://github.com/nesquena/query_reviewer.git"
+In Rails 2, Rake tasks are not automatically loaded from gems, so you’ll need to add the following to your Rakefile:
+
+ begin
+ require 'query_reviewer/tasks'
+ rescue LoadError
+ STDERR.puts "Run `rake gems:install` to install query_reviewer"
+ end
+
You can then run:
rake query_reviewer:setup
View
3  lib/tasks/query_reviewer_tasks.rake → lib/query_reviewer/tasks.rb
@@ -1,4 +1,3 @@
-# desc "Explaining what the task does"
namespace :query_reviewer do
desc "Create a default config/query_reviewer.yml"
task :setup do
@@ -6,4 +5,4 @@
dest_path = File.join(Rails.root, "config", "query_reviewer.yml")
FileUtils.copy(defaults_path, dest_path)
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.