-
-
Save databyte/4cd2bbe68f98f2f0249f to your computer and use it in GitHub Desktop.
Non-broken Rake 0.9.0 RakeFile Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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'