gpt4 book ai didi

ruby-on-rails - 使用 rake 10.1.0 预编译 Assets 时出错

转载 作者:行者123 更新时间:2023-12-03 16:08:57 25 4
gpt4 key购买 nike

我使用的是 rake 10.0.4 并且我已经升级到 10.1.0,但是现在当我部署到我的登台服务器时,它抛出了我:

rake aborted!
undefined method `push' for LL("db"):Rake::Scope
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank/dsl.rb:11:in `override_task'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/tasks/seed.rake:42:in `block in <top (required)>'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/tasks/seed.rake:1:in `<top (required)>'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `block in load'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:245:in `load'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank.rb:19:in `block in load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank.rb:19:in `each'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank.rb:19:in `load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/seedbank-0.1.3/lib/seedbank/railtie.rb:9:in `block in <class:Railtie>'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `instance_exec'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `block in load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `each'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie.rb:184:in `load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/engine.rb:423:in `block in load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/application/railties.rb:8:in `each'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/application/railties.rb:8:in `all'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/engine.rb:423:in `load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/application.rb:145:in `load_tasks'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/alter/workspace/MyApp/Rakefile:7:in `<top (required)>'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/bin/ruby_noexec_wrapper:14:in `eval'
/home/alter/.rvm/gems/ruby-1.9.3-p429@3.2.13/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

我的 Rakefile 没有什么特别的:
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

MyApp::Application.load_tasks

如果我再次降级到 10.0.4,它工作正常。有什么线索吗?

最佳答案

这是种子库 gem 的一个已知问题。最新版本的种子库(0.2.1)仍然存在问题,所以建议在seedback issues是在你的 Gemfile 中使用来自 github 的版本:

gem 'seedbank', github: 'james2m/seedbank'

关于ruby-on-rails - 使用 rake 10.1.0 预编译 Assets 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17328154/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com