0
githubで見つけたいくつかのソリューション(rake 0.8.7へのロールバック)を試しましたが、uninitialized constant Rake::DSL
は決して消えませんでした。Rails 3.2.1、Rake :: DSLを使ったrake db:migrate
出力:
[email protected]:~/apps/dev$ rake db:migrate
(in /home/bartolsthoorn/apps/dev)
rake aborted!
uninitialized constant Rake::DSL
/home/bartolsthoorn/.bundle/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8:in `<class:TaskLib>'
/home/bartolsthoorn/.bundle/gems/rake-0.9.2.2/lib/rake/tasklib.rb:6:in `<module:Rake>'
/home/bartolsthoorn/.bundle/gems/rake-0.9.2.2/lib/rake/tasklib.rb:3:in `<top (required)>'
/home/bartolsthoorn/.bundle/gems/rake-0.9.2.2/lib/rake/testtask.rb:4:in `<top (required)>'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/test_unit/testing.rake:2:in `<top (required)>'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/test_unit/railtie.rb:12:in `block in <class:TestUnitRailtie>'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie.rb:184:in `instance_exec'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie.rb:184:in `block in load_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie.rb:184:in `each'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie.rb:184:in `load_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/engine.rb:423:in `block in load_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/application/railties.rb:8:in `each'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/application/railties.rb:8:in `all'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/engine.rb:423:in `load_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/application.rb:145:in `load_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/bartolsthoorn/apps/dev/Rakefile:9:in `<top (required)>'
/opt/lib/ruby/1.9.1/rake.rb:2373:in `load'
/opt/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/opt/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/opt/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/opt/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/opt/lib/ruby/1.9.1/rake.rb:1991:in `run'
/opt/bin/rake:31:in `<main>'
マイバンドル:
Gems included by the bundle:
* POpen4 (0.1.4)
* Platform (0.4.0)
* RedCloth (4.2.9)
* actionmailer (3.2.1)
* actionpack (3.2.1)
* activemodel (3.2.1)
* activerecord (3.2.1)
* activeresource (3.2.1)
* activesupport (3.2.1)
* arel (3.0.0)
* authlogic (3.1.0)
* builder (3.0.0)
* bundler (1.0.7)
* erubis (2.7.0)
* hike (1.2.1)
* i18n (0.6.0)
* jammit (0.6.5)
* journey (1.0.1)
* jquery-rails (2.0.0)
* json (1.6.5)
* mail (2.4.1)
* mime-types (1.17.2)
* multi_json (1.0.4)
* open4 (1.3.0)
* polyglot (0.3.3)
* rack (1.4.1)
* rack-cache (1.1)
* rack-ssl (1.3.2)
* rack-test (0.6.1)
* rails (3.2.1)
* railties (3.2.1)
* rake (0.9.2.2)
* rdoc (3.12)
* sprockets (2.1.2)
* sqlite3 (1.3.5)
* sqlite3-ruby (1.3.3)
* thor (0.14.6)
* tilt (1.3.3)
* treetop (1.4.10)
* tzinfo (0.3.31)
* yui-compressor (0.9.6)
私は0.8.7これに熊手を設定した結果である。この特定の上でこの問題を解決する方法
[email protected]:~/apps/dev$ bundle show rake
/home/bartolsthoorn/.bundle/gems/rake-0.8.7
[email protected]:~/apps/dev$ bundle exec rake db:migrate
(in /home/bartolsthoorn/apps/dev)
rake aborted!
uninitialized constant Rake::DSL
/home/bartolsthoorn/apps/dev/Rakefile:9:in `<top (required)>'
(See full trace by running task with --trace)
[email protected]:~/apps/dev$ rake db:migrate
(in /home/bartolsthoorn/apps/dev)
rake aborted!
uninitialized constant Rake::DSL
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/tasks/documentation.rake:11:in `<class:RDocTaskWithoutDescriptions>'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/tasks/documentation.rake:10:in `<top (required)>'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/tasks.rb:15:in `block in <top (required)>'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/tasks.rb:6:in `each'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/tasks.rb:6:in `<top (required)>'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/application.rb:289:in `block in initialize_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie.rb:184:in `instance_exec'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie.rb:184:in `block in load_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie.rb:184:in `each'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie.rb:184:in `load_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/engine.rb:424:in `load_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/application.rb:145:in `load_tasks'
/home/bartolsthoorn/.bundle/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/bartolsthoorn/apps/dev/Rakefile:9:in `<top (required)>'
/opt/lib/ruby/1.9.1/rake.rb:2373:in `load'
/opt/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/opt/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/opt/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/opt/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/opt/lib/ruby/1.9.1/rake.rb:1991:in `run'
/opt/bin/rake:31:in `<main>'
セットアップ?
、これはあなたがフレームワークの古いバージョンからアップグレードした新しいRailsの3.2.1アプリまたはいずれか:
は、上記の「熊手」を必要とし、あなたのRakefileでこれを入れて? –これはもともとRails 3.2.1用に作成されたものです。レーキに影響はありますか?私は 'gem 'rails'、 '3.1.1' gem 'rake'、 '0.8.7''を設定することでこの問題を解決しましたが、これは3.2.1でも有効です! – bartolsthoorn