diff --git a/rake-tasks/ruby.rb b/rake-tasks/ruby.rb
index <HASH>..<HASH> 100644
--- a/rake-tasks/ruby.rb
+++ b/rake-tasks/ruby.rb
@@ -71,8 +71,11 @@ begin
 
    s.add_dependency "json_pure"
    s.add_dependency "ffi"
-   s.add_development_dependency "rspec"
-   s.add_development_dependency "rack"
+
+   if s.respond_to? :add_development_dependency
+     s.add_development_dependency "rspec"
+     s.add_development_dependency "rack"
+   end
 
    s.require_paths = []
JariBakken: Make sure the rakefile works with older rubygems versions.

r<I>