Error with Rake RDoc using Rails 4 - ruby-on-rails

Rake is failing to run after an upgrade to Rails 4 and it was running fine before I upgraded my gems. I am on Ruby 1.9.3. For some reason rdoc doesn't recognize the markup attribute, but I can't find anything about it getting removed or renamed.
This is the error message I am getting.
undefined method `markup=' for #<RDoc::Task:0x007fb4b46be660>
The relevant code snippet (complete deploy.rake not shown)
RollOut::DeployTask.new do |d|
d.test = RSpec::Core::RakeTask.new
d.doc = RDoc::Task.new :doc do |rdoc|
rdoc.rdoc_files.include('README.md', 'lib/**/*.rb', 'app/**/*.rb')
rdoc.rdoc_dir = 'target/doc'
rdoc.markup = 'tomdoc'
end
The complete trace:
> RAILS_ENV=production rake assets:precompile --trace
rake aborted!
undefined method `markup=' for #<RDoc::Task:0x007fb4b46be660>
/Users/rust/test_app/lib/tasks/deploy.rake:16:in `block (2 levels) in
<top (required)>'
/Users/rust/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/rdoc/task.rb:158:in
`initialize'
/Users/rust/test_app/lib/tasks/deploy.rake:14:in `new'
/Users/rust/test_app/lib/tasks/deploy.rake:14:in `block in <top
(required)>'
/Users/rust/roll_out/lib/roll_out/deploy_task.rb:73:in `initialize'
/Users/rust/test_app/lib/tasks/deploy.rake:12:in `new'
/Users/rust/test_app/lib/tasks/deploy.rake:12:in `<top (required)>'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-
4.0.0/lib/active_support/dependencies.rb:222:in `load'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-
4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-
4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-
4.0.0/lib/active_support/dependencies.rb:222:in `load'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties-
4.0.0/lib/rails/engine.rb:641:in `block in run_tasks_blocks'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties-
4.0.0/lib/rails/engine.rb:641:in `each'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties-
4.0.0/lib/rails/engine.rb:641:in `run_tasks_blocks'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties-
4.0.0/lib/rails/application.rb:244:in `run_tasks_blocks'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties-
4.0.0/lib/rails/engine.rb:446:in `load_tasks'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/railties-
4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/rust/test_app/Rakefile:7:in `<top (required)>'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-
10.1.0/lib/rake/rake_module.rb:25:in `load'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-
10.1.0/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-
10.1.0/lib/rake/application.rb:637:in `raw_load_rakefile'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-
10.1.0/lib/rake/application.rb:94:in `block in load_rakefile'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-
10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-
10.1.0/lib/rake/application.rb:93:in `load_rakefile'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-
10.1.0/lib/rake/application.rb:77:in `block in run'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-
10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-
10.1.0/lib/rake/application.rb:75:in `run'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/gems/rake-10.1.0/bin/rake:33:in `<top
(required)>'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/bin/rake:23:in `load'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/bin/rake:23:in `<main>'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in `eval'
/Users/rust/.rvm/gems/ruby-1.9.3-p429/bin/ruby_noexec_wrapper:14:in `<main>'
Does anyone has any idea what could be causing this and/or how to fix it?

The error seems to go away if I add gem 'rdoc' to my gem file. I am not sure why this makes any difference, because it was already a dependency of another gem

Related

How to fix 'rails aborted' error when running "rails db:create db:migrate "?

This is the error message I get:
rails aborted!
LoadError: cannot load such file -- active_record/railties/databases.rake
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:69:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:69:in `rescue in load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:52:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activerecord-5.2.3/lib/active_record/railtie.rb:49:in `block in <class:Railtie>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:246:in `instance_exec'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:246:in `block in run_tasks_blocks'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:255:in `each'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:255:in `each_registered_block'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/railtie.rb:246:in `run_tasks_blocks'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/application.rb:514:in `block in run_tasks_blocks'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/engine/railties.rb:15:in `each'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/engine/railties.rb:15:in `each'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/application.rb:514:in `run_tasks_blocks'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/engine.rb:459:in `load_tasks'
/Users/Prodigy/code/PierceF/conqueredtime/Rakefile:6:in `<top (required)>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:54:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `block in load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:285:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/commands/rake/rake_command.rb:22:in `block in perform'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/command.rb:48:in `invoke'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/railties-5.2.3/lib/rails/commands.rb:18:in `<top (required)>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require'
/Users/Prodigy/code/PierceF/conqueredtime/bin/rails:9:in `<top (required)>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/client/rails.rb:28:in `call'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/client/command.rb:7:in `call'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/client.rb:30:in `run'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/bin/spring:49:in `<top (required)>'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `load'
/Users/Prodigy/.rvm/gems/ruby-2.5.3/gems/spring-2.1.0/lib/spring/binstub.rb:11:in `<top (required)>'
/Users/Prodigy/code/PierceF/conqueredtime/bin/spring:15:in `require'
/Users/Prodigy/code/PierceF/conqueredtime/bin/spring:15:in `<top (required)>'
bin/rails:3:in `load'
bin/rails:3:in `<main>'
Caused by:
Bootsnap::LoadPathCache::FallbackScan:
(See full trace by running task with --trace)
I also tried bundle exec rails db:create db:migrate but that still had no effect.
Since I was having this error only with this rails project and not the others, I thought maybe I'll try starting a brand new rails project and copy-paste the code/files from the older project into this new one. That fixed the issue! I guess since this is a small app I was able to get away with it.

'rake db:migrate:up VERSION=' aborts

I created a migration. I am trying to run it by:
rake db:migrate:up VERSION=
It raises the following error:
D, [2018-06-03T13:20:41.295098 #2257] DEBUG -- : ** [Raven] Sending event 2a32cb0c249acd2efde26ce6453a2d77 to Sentry
D, [2018-06-03T13:20:41.343397 #2257] DEBUG -- : ** [Raven] Raven HTTP Transport connecting to https://app.getsentry.com
rake aborted!
NoMethodError: undefined method `last_comment' for #<Rake::Application:0x007fb71d8a76a0>
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.4/lib/rspec/core/rake_task.rb:101:in `define'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-core-3.0.4/lib/rspec/core/rake_task.rb:78:in `initialize'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-rails-3.0.2/lib/rspec/rails/tasks/rspec.rake:11:in `new'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-rails-3.0.2/lib/rspec/rails/tasks/rspec.rake:11:in `<top (required)>'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `block in load'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:268:in `load'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rspec-rails-3.0.2/lib/rspec-rails.rb:13:in `block in <class:Railtie>'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/railtie.rb:237:in `instance_exec'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/railtie.rb:237:in `block in run_tasks_blocks'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/railtie.rb:245:in `each'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/railtie.rb:245:in `each_registered_block'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/railtie.rb:237:in `run_tasks_blocks'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:437:in `block in run_tasks_blocks'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine/railties.rb:13:in `each'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine/railties.rb:13:in `each'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/application.rb:437:in `run_tasks_blocks'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/railties-4.2.0/lib/rails/engine.rb:453:in `load_tasks'
/Rakefile:6:in `<top (required)>'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/lib/rake/rake_module.rb:29:in `load_rakefile'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/lib/rake/application.rb:703:in `raw_load_rakefile'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/lib/rake/application.rb:104:in `block in load_rakefile'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/lib/rake/application.rb:103:in `load_rakefile'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/lib/rake/application.rb:82:in `block in run'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/.rbenv/versions/2.1.2/bin/rake:23:in `load'
/.rbenv/versions/2.1.2/bin/rake:23:in `<main>'
How can I deal with it?
Specify version when migrating. This is good is you want to migrate only specific version of your migration. If you want to migrate all pending migration you can just say rake db:migrate.
Example:
rake db:migrate:up VERSION=20120820165642
I had to run the command against local rails
rake db:migrate:up VERSION=20120820165642 RAILS_ENV=test
works for me

Rake Command Not Working

Getting this error while running RAKE command :-
rake --trace
rake aborted!
There was an error while trying to load the gem 'coffee-rails'.
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:81:in rescue in block (2 levels) in require'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/apps/apache/Sekhmet/user/config/application.rb:7:in `<top (required)>'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
/apps/apache/Sekhmet/user/Rakefile:5:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:637:in `raw_load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:94:in `block in load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:93:in `load_rakefile'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:77:in `block in run'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/rake:22:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p194/bin/rake:22:in `<main>'
Following is my Rake File:-
require File.expand_path('../config/application', FILE)
MyAppName::Application.load_tasks
Please Help!
Do this
gem install coffee-rails
Then restart server and run rake command

cant run a rake task on Heroku

I am running this command 'heroku run -a my_app RAILS_ENV=production rake -T --trace'
And I receive this stacktrace:
rake aborted!
undefined method `task' for #<Rspec::Core::RakeTask:0x00000002e82d60>
/app/lib/tasks/rspec.rake:9:in `initialize'
/app/lib/tasks/rspec.rake:39:in `new'
/app/lib/tasks/rspec.rake:39:in `<top (required)>'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `block in load'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
/app/.bundle/gems/ruby/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:425:in `block in load_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:425:in `each'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/engine.rb:425:in `load_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/application.rb:145:in `load_tasks'
/app/.bundle/gems/ruby/1.9.1/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/Rakefile:12:in `<top (required)>'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load_rakefile'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:583:in `raw_load_rakefile'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:89:in `block in load_rakefile'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:88:in `load_rakefile'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:72:in `block in run'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/app/.bundle/gems/ruby/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
.bundle/gems/ruby/1.9.1/bin/rake:19:in `load'
.bundle/gems/ruby/1.9.1/bin/rake:19:in `<main>'
This is part from my gemfile:
gem "rails", "~> 3.2.13"
gem 'json', '~>1.7.7'

How to analyze a ruby error?

C:\Users\Vlad\Desktop>rake routes
(in C:/Users/Vlad/Desktop)
rake aborted!
uninitialized constant Rake::DSL
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8:in `<class:TaskLib>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:6:in `<module:Rake>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/tasklib.rb:3:in `<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/testtask.rb:4:in `require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/testtask.rb:4:in `<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/test_unit/testing.rake:2:in `require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/test_unit/testing.rake:2:in `<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/test_unit/railtie.rb:12:in `load'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/test_unit/railtie.rb:12:in `block in <class:TestUnitRailtie>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/railtie.rb:183:in `call'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/railtie.rb:183:in `block in load_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/railtie.rb:183:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/railtie.rb:183:in `load_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:396:in `block in load_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/application/railties.rb:8:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/application/railties.rb:8:in `all'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/engine.rb:396:in `load_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/application.rb:103:in `load_tasks'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
C:/Users/Vlad/Desktop/kindle/Rakefile:7:in `<top (required)>'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `load'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
C:/Ruby192/lib/ruby/1.9.1/rake.rb:1991:in `run'
C:/Ruby192/bin/rake:31:in `<main>'
Can you walk me through the logic of why these lines appear in the console? I'm not interested in a particular error. When something messes up and I see a log like this, what does it mean?
Does the FIRST error say something critical about why the program broke down? If an error is really vague, what is a general logic I should look for in the error messages?
This lines are just backtrace of exception
http://www.ruby-doc.org/core-1.9.3/Exception.html#method-i-backtrace
also you can run commands with --trace flag

Resources