无法执行任何耙任务...说“耙中止了!不知道如何建立任务

时间:2019-05-28 20:19:03

标签: ruby-on-rails

每次我尝试运行一个rake任务时,它都会说同样的事情:“不知道如何构建任务”。什么会导致这种情况发生?我不知道从哪里开始找出问题所在。我在Ubuntu上使用Ruby 2.5.5和Rails 5.2.3。

宝石文件:

source 'https://rubygems.org'

ruby '2.5.5'
gem 'rails'
gem 'pg'                                                                                                                                                      # Use PostgreSQL for the database
gem 'puma'                                                                                                                                      # Use Puma as the app server
gem 'sass-rails'                                                                                                                                # Use SCSS for stylesheets
gem 'uglifier'                                                                                                                                # Use Uglifier as compressor for JavaScript assets
gem 'coffee-rails'                                                                                                                            # Use CoffeeScript for .coffee assets and views
gem 'jquery-rails'                                                                                                                            # Use jquery as the JavaScript library
gem 'turbolinks'                                                                                                                                  # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'jbuilder'                                                                                                                                  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'bootstrap-sass'                                                                                                                                  # Use Bootstrap for CSS styling
gem 'slim-rails'
gem 'devise'
gem 'omniauth'
gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'      # Use BCrypt for devise ActiveModel has_secure_password, original gem version => gem 'bcrypt', '~> 3.1.7'
gem 'foreman'                                                                             # Use Foreman to save passwords for email/Mailer without them being stored where others can see the password (creates variable for username and password)

gem 'rails_12factor', group: :production                                                                                                    # Heroku needs this -- don't know what it does

group :development, :test do
  gem 'byebug', platform: :mri                                                                                                                      # Call 'byebug' anywhere in the code to stop execution and get a debugger console

end

group :development do
  gem 'web-console'                                                                                                                                 # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'listen'
  gem 'spring'                                                                                                                                      # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring-watcher-listen'
end



#Seed Dump
gem 'seed_dump', '~> 3.2', '>= 3.2.4'

Rake文件:

#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run

错误:

$ rake db:migrate:status --trace
rake aborted!
Don't know how to build task 'db:migrate:status' (See the list of available tasks with `rake --tasks`)
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/task_manager.rb:59:in `[]'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:159:in `invoke_task'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
/home/cmmc/.rvm/gems/ruby-2.5.5/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/home/cmmc/.rvm/gems/ruby-2.5.5/bin/rake:23:in `load'
/home/cmmc/.rvm/gems/ruby-2.5.5/bin/rake:23:in `<main>'
/home/cmmc/.rvm/gems/ruby-2.5.5/bin/ruby_executable_hooks:24:in `eval'
/home/cmmc/.rvm/gems/ruby-2.5.5/bin/ruby_executable_hooks:24:in `<main>'

0 个答案:

没有答案