Home > Software engineering >  rails app:update says don't know how too build 'app:update'
rails app:update says don't know how too build 'app:update'

Time:09-12

I am upgrading a rails 4 application and when I run rails app:update i see the error message Don't know how to build task 'app:update'

Don't know how to build task 'app:update'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/task_manager.rb:49:in `[]'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/application.rb:148:in `invoke_task'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
/Users/akshar/.rbenv/versions/2.6.10/bin/rake:23:in `load'
/Users/akshar/.rbenv/versions/2.6.10/bin/rake:23:in `<top (required)>'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `load'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/cli/exec.rb:74:in `kernel_load'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/cli/exec.rb:28:in `run'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/cli.rb:463:in `exec'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/cli.rb:27:in `dispatch'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/cli.rb:18:in `start'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:30:in `block in <top (required)>'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/2.6.0/bundler/friendly_errors.rb:124:in `with_friendly_errors'
/Users/akshar/.rbenv/versions/2.6.10/lib/ruby/gems/2.6.0/gems/bundler-1.17.2/exe/bundle:22:in `<top (required)>'
/Users/akshar/.rbenv/versions/2.6.10/bin/bundle:23:in `load'
/Users/akshar/.rbenv/versions/2.6.10/bin/bundle:23:in `<main>

Any help how to fix this would be great.

Thanks.

CodePudding user response:

It used to be:

rake rails:update

https://github.com/rails/rails/blob/v4.2.11.3/guides/source/upgrading_ruby_on_rails.md#the-rake-task

rails namespace was renamed to app in rails v5:

https://github.com/rails/rails/commit/eaec958630ea53cddb84ef4746b23bcd917ba45d

  • Related