Having trouble with rake - ruby-on-rails

I am trying to run the database migrations that I've just created. Rake worked well before, I think I messed up the dependencies or the versions. Here is what I get when running.
rake:db:migrate --trace
rake aborted!
no such file to load -- rake/rdoctask
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1:in `require'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks/documentation.rake:1
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks.rb:15:in `load'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks.rb:15
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks.rb:6:in `each'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/tasks.rb:6
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:214:in `require'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:214:in `initialize_tasks'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:139:in `load_tasks'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `send'
/var/lib/gems/1.8/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
/home/maaz/Desktop/rails_apps/todo/Rakefile:7
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:581:in `raw_load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:87:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:86:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:70:in `run'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:68:in `run'
/var/lib/gems/1.8/gems/rake-10.0.2/bin/rake:37
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19

Related

rake aborted: LoadError: cannot load such file -- /home/deploy/myapp/config/application

I am getting following error while running command
bundle exec rake db:migrate --trace
I am using rvm and ruby version is 2.3.1.
Here is output
deploy#localhost:~/my-sources$ bundle exec rake db:migrate
--trace rake aborted! LoadError: cannot load such file -- /home/deploy/myapp/config/application
/home/deploy/myapp-sources/Rakefile:4:in `require'
/home/deploy/myapp-sources/Rakefile:4:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/usr/local/rvm/gems/ruby-2.3.1#global/gems/rake-10.4.2/bin/rake:33:in `<top (required)>' /usr/local/rvm/rubies/ruby-2.3.1/bin/rake:23:in
`load' /usr/local/rvm/rubies/ruby-2.3.1/bin/rake:23:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `load'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli.rb:463:in `exec'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli.rb:27:in `dispatch'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/cli.rb:18:in `start'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/exe/bundle:30:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/usr/local/rvm/gems/ruby-2.3.1/gems/bundler-1.17.1/exe/bundle:22:in `<top (required)>' /usr/local/rvm/gems/ruby-2.3.1/bin/bundle:23:in `load' /usr/local/rvm/gems/ruby-2.3.1/bin/bundle:23:in `<main>'
/usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in
`<main>'

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

heroku run rake db:migrate fails with "cannot load such file -- debugger"

I'm getting this weird error when I try to migrate my database. Does anyone know what's going on?
There are no require debugger calls in any of my migrations. I do have some in another rake task that's not a migration, though. Is it possible that that's the problem?
me$ heroku run rake db:migrate --trace
Running `rake db:migrate --trace` attached to terminal... up, run.2463
rake aborted!
cannot load such file -- debugger
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/app/lib/tasks/misc.rake:6:in `<top (required)>'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/app/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.0/lib/rails/engine.rb:641:in `block in run_tasks_blocks'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.0/lib/rails/engine.rb:641:in `each'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.0/lib/rails/engine.rb:641:in `run_tasks_blocks'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.0/lib/rails/application.rb:244:in `run_tasks_blocks'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.0/lib/rails/engine.rb:446:in `load_tasks'
/app/vendor/bundle/ruby/2.1.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/Rakefile:6:in `<top (required)>'
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/rake/rake_module.rb:25:in `load'
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/rake/rake_module.rb:25:in `load_rakefile'
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/rake/application.rb:637:in `raw_load_rakefile'
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/rake/application.rb:94:in `block in load_rakefile'
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/rake/application.rb:165:in `standard_exception_handling'
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/rake/application.rb:93:in `load_rakefile'
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/rake/application.rb:77:in `block in run'
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/rake/application.rb:165:in `standard_exception_handling'
/app/vendor/ruby-2.1.0/lib/ruby/2.1.0/rake/application.rb:75:in `run'
/app/bin/rake:4:in `<main>'
Ah, ok. Figured it out. One my other rake tasks had require debugger in its root scope. That's what was throwing heroku off. Problem solved.

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'

When i run rake db:create ,Error rake aborted! uninitialized constant Cucumber

I am trying to experiment on an open source application application .
when i run
$ rake db:create
Following is the stacktrace
rake aborted!
uninitialized constant Cucumber
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:443:in `load_missing_constant'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:92:in `const_missing'
/home/BigBangTheory/Desktop/spot-us/lib/tasks/cucumber.rake:13
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1882:in `in_namespace'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:910:in `namespace'
/home/BigBangTheory/Desktop/spot-us/lib/tasks/cucumber.rake:12
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:145:in `load'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:145:in `load'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/rails.rb:8
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/rails.rb:8:in `each'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/tasks/rails.rb:8
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/home/BigBangTheory/Desktop/spot-us/Rakefile:9
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Any help ?
You need Cucumber!
[~/railsapp]$ script/plugin install git://github.com/aslakhellesoy/cucumber.git

Resources