secret
Last active — forked from /Rakefile

Non-broken Rake 0.9.0 RakeFile Example

  • Download Gist
Rakefile
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
 
require File.expand_path('../config/application', __FILE__)
 
module ::YourApplicationName
class Application
include Rake::DSL
end
end
 
module ::RakeFileUtils
extend Rake::FileUtilsExt
end
 
YourApplicationName::Application.load_tasks

both gists doesn't work for me I still get the same error
rake aborted!
uninitialized constant Rake::DSL
/app/Rakefile:8:in <class:Application>'
/app/Rakefile:7:in
module:LimBuzz'
/app/Rakefile:6:in <top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in
load'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in raw_load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in
block in load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2006:in
load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1991:in `run'

Rake is now at 0.9.2 and no longer requires the use of including the DSL into your application.
http://rubygems.org/gems/rake

Thanks but I already use 0.9.2 and I got this problem , any suggestions

I am having exact same trouble as described by azzab. I have used 0.9.2. How to fix this?

I got over it using the following rake 0.9.2 and including require 'rake/dsl_definition'
in the rake file

this is my rakefile now

#!/usr/bin/env rake

Add your own tasks in files placed in lib/tasks ending in .rake,

for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', FILE)
require 'rake/dsl_definition'

Limbuzz::Application.load_tasks

adding "require 'rake/dsl_definition'" to my rakefile worked for me.
windows 7
rails 3.0.9

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.