Skip to content

Instantly share code, notes, and snippets.

@databyte
Forked from anonymous/Rakefile
Created May 22, 2011 09:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save databyte/4cd2bbe68f98f2f0249f to your computer and use it in GitHub Desktop.
Save databyte/4cd2bbe68f98f2f0249f to your computer and use it in GitHub Desktop.
Non-broken Rake 0.9.0 RakeFile Example
# 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
@amoldjoshi
Copy link

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

@azzab
Copy link

azzab commented Jul 10, 2011

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

@jacobsimeon
Copy link

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