ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

uninitialized constant Rake::DSL while using rake db:migrate (Bug #528)


Added by Florian Mutter at 2011-07-16 04:57 pm. Updated at 2011-07-21 07:03 am.


Status:Closed Start date:2011-07-16
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Remote issue URL: Affected version:master

Description

When executing rake db:migrate I got the following error:

rake aborted!
uninitialized constant Rake::DSL
/.../Rakefile:7:in `require'
(See full trace by running task with --trace)

This error can be fixed by adding require 'rake/dsl_definition' in the Rakefile before the require 'rake' line.

Additional info:

# rake --version
rake, version 0.8.7
# ruby --version
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]


Associated revisions

Revision 60d066f9
Added by Jean-Philippe Lang at 2008-07-26 01:46 pm

Wiki page hierarchy (#528). Parent page can be assigned on Rename screen.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1698 e93f8b46-1217-0410-a6f0-8f06a7374b81

Revision ec7d1359
Added by Jean-Philippe Lang at 2008-07-26 02:54 pm

Adds child_pages macro for wiki pages (#528).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1699 e93f8b46-1217-0410-a6f0-8f06a7374b81

History

Updated by Holger Just at 2011-07-16 05:15 pm

Could you please run the rake task again as rake db:migrate --trace so that we can see the full stack trace? I doubt that this is an issue of the Chili core but of a plugin.

Also, which version of Chili are you using?

Updated by Holger Just at 2011-07-16 05:16 pm

Okay, strip the version question... But we still need the trace.

  • Status changed from Open to Needs more information

Updated by Florian Mutter at 2011-07-16 05:18 pm

# RAILS_ENV=production rake db:migrate --trace
(in /var/www/htdocs)
rake aborted!
uninitialized constant Rake::DSL
/usr/lib/ruby/1.8/rake.rb:2503:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/tasklib.rb:8
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/testtask.rb:4:in `require'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/testtask.rb:4
/var/www/htdocs/Rakefile:8:in `require'
/var/www/htdocs/Rakefile:8
/usr/lib/ruby/1.8/rake.rb:2383:in `load'
/usr/lib/ruby/1.8/rake.rb:2383:in `raw_load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/1.8/rake.rb:2000:in `run'
/usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/1.8/rake.rb:1998:in `run'
/usr/bin/rake:28

It says Rakefile:8 because I just commented out my fix.

Updated by Florian Mutter at 2011-07-16 05:24 pm

I'm on the stable branch... not the master. Picked the wrong.

EDIT: Same on branch master

Updated by Holger Just at 2011-07-16 05:44 pm

In your stack trace it says you are actually using rake 0.9.2. Please make sure you stated the correct used version. At best, please provide the output of bundle install.

As I can't reproduce your issue with both master and stable on Ruby 1.8.7-p334 with any of Rake 0.8.7, 0.9.1 or 0.9.1 on OSX 10.6. I think it's something in your installation of Ruby. As a last test could you try to run bundle exec rake db:migrate?

Please also tell us where you git your Ruby and Rake from (e.g. rvm or OS packages), also which OS you use.

Updated by Florian Mutter at 2011-07-16 06:03 pm

The second version of rake was indeed the problem. I am using Debian Squeeze and had rake installed with apt-get. Therefor, there were two versions. What I did now is apt-get remove rake and gem install rake to reinstall the new version of rake. Now rake --version says I'm on 0.9.2 and rake db:migrate is working. So I close this bug. Thanks for your help.

  • Status changed from Needs more information to Closed

Updated by Holger Just at 2011-07-21 07:03 am

  • Subject changed from uninitialized constant Rake::DS while using rake db:migrate to uninitialized constant Rake::DSL while using rake db:migrate

Also available in: Atom PDF