我无法在Ruby on Rails应用程序中运行Rake任务。我在线尝试了不同的解决方案,但总是以相同的错误结束。无法找到解决此问题的方法。我更新了rsms-rails等一些解决方案中描述的gems。但是,我仍然在努力寻找解决方案。
在我的问题之下:
vagrant@weblinc-development:~/tahariasl$ bundle show rspec
/home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/rspec-3.2.0
vagrant@weblinc-development:~/tahariasl$ bundle exec rake db:drop
W, [2018-03-19T19:57:14.973894 #28261] WARN -- sentry: ** [Raven] Unable to load raven/integrations/rack-timeout: uninitialized constant Rack::Timeout::RequestTimeoutException
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
/home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/http/mime_type.rb:163: warning: already initialized constant Mime::PDF
/home/vagrant/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.6/lib/action_dispatch/http/mime_type.rb:163: warning: previous definition of PDF was here
rake aborted!
Weblinc::Decorator::InvalidDecorator:
Problem:
To allow decorating modules, this method can only be used to
decorate constants in the `Weblinc` namespace.
Summary:
To ensure decoration of modules will occur for any objects
which have already included that module, we track module
subclasses in the `Weblinc` namespace. Therefore, we cannot
guarantee module decoration will work for constants outside
the `Weblinc` namespace.
Resolution:
Use `class_eval`, `module_eval`, `prepend` or the like to
acheive the decoration you want.
/home/vagrant/tahariasl/app/decorators/models/weblinc/payment/processing_decorator.rb:2:in `<module:Weblinc>'
/home/vagrant/tahariasl/app/decorators/models/weblinc/payment/processing_decorator.rb:1:in `<top (required)>'
/home/vagrant/tahariasl/config/environment.rb:5:in `<top (required)>'
/home/vagrant/.rbenv/versions/2.2.2/bin/bundle:23:in `load'
/home/vagrant/.rbenv/versions/2.2.2/bin/bundle:23:in `<main>'
Tasks: TOP => db:drop => db:mongoid:drop => environment
(See full trace by running task with --trace)