YMMV, but I'm pretty sure Rake 0.9.2 fixes this. Another solution is to add the following to your Rakefile, right after "require 'rake'"
class Rails::Application include Rake::DSL end (from memory; please let me know if it doesn't work and I'll look it up for you) On Jun 17, 7:01 pm, Daniel Myasnikov <[email protected]> wrote: > Hey > > I had the same issue, and the whole yesterday to solve it. > > First of all, if you are using Rake 0.8.7 and put "require 'rake/ > dsl_definition'" it won't work for you. This feature was introduced > for Rake 0.9.x. > > I strongly recommend to use Rake 0.8.7 > > and get rid out of everything that you put for rake 0.9.x, such as > 'include Rake:dsl' and extend Rake::FileUtilsExt > > So your RakeFile file should look like: > > require File.expand_path('../config/application', __FILE__) > > require 'rake' > > MyApplicationName::Application.load_tasks > > 2. Secondly check if you have installed Rake 0.9.x and remove it from > your computer and use Rake 0.8.7, which you have to install before > using > > 3. Use gem "rake", "0.8.7" in your GemFile just after source 'http:// > rubygems.org' > > 4. Make sure your gem for rails is '3.0.9' > > 5. Some said that this gem also helped them gem 'sqlite3', > '1.3.3', :group => :development > > Also don't forget about debugging your Heroku application using > 'heroku logs' > > Daniel Myasnikov > > On Jun 18, 11:43 am, Karl <[email protected]> wrote: > > > > > > > > > Using Rails 3.0.9 (3.0.7 too), which load rake 0.9.2 with bamboo- > > mri-1.9.2, causes: > > > $ heroku rake db:migrate > > rake aborted! > > uninitialized constant Rake::DSL > > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:8:in > > `<class:TaskLib>' > > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:6:in > > `<module:Rake>' > > /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/tasklib.rb:3:in > > `<top (required)>' > > /app/.bundle/gems/ruby/1.9.1/gems/rdoc-3.6.1/lib/rdoc/task.rb:37:in > > `<top (required)>' > > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks/ > > documentation.rake:2:in `<top (required)>' > > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb: > > 15:in `block in <top (required)>' > > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb: > > 6:in `each' > > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/tasks.rb: > > 6:in `<top (required)>' > > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/ > > application.rb:215:in `initialize_tasks' > > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/ > > application.rb:139:in `load_tasks' > > /app/.bundle/gems/ruby/1.9.1/gems/railties-3.0.9/lib/rails/ > > application.rb:77:in `method_missing' > > /app/Rakefile:7: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' > > /usr/ruby1.9.2/bin/rake:31:in `<main>' > > (in /app) > > > I had to add, before require 'rake': > > > # Rakefile > > require 'rake/dsl_definition' > > > But I don't get this on my development machine. Why? -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
