gpt4 book ai didi

ruby-on-rails - 无法在任何来源中找到 json-1.8.3 (Bundler::GemNotFound)

转载 作者:数据小太阳 更新时间:2023-10-29 07:55:24 26 4
gpt4 key购买 nike

我的所有 cron 作业都出错,日志是:该错误不会影响我的 Web 应用程序,但会影响我的后台作业。我的系统似乎有错误,但不知道如何修复。有 2 个版本的 json,我试图卸载它,但 json-1.8.1 不能,因为它是默认的。请帮忙。谢谢!

/root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find json-1.8.3 in any of the sources (Bundler::GemNotFound)
from /root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler/spec_set.rb:85:in `map!'
from /root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler/spec_set.rb:85:in `materialize'
from /root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler/definition.rb:140:in `specs'
from /root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler/definition.rb:185:in `specs_for'
from /root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler/definition.rb:174:in `requested_specs'
from /root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler/environment.rb:18:in `requested_specs'
from /root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler/runtime.rb:13:in `setup'
from /root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler.rb:127:in `setup'
from /root/.rvm/gems/ruby-2.2.0/gems/bundler-1.10.5/lib/bundler/setup.rb:18:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'

gem list :

gem list json

* 本地 gem *

JSON (1.8.3, 1.8.1)multi_json (1.11.2)

gem 文件:

gem 'rails', '4.2.0'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'therubyracer', platforms: :ruby

gem 'mysql2', '~> 0.3.18'
gem 'bcrypt', '3.1.7'
gem 'paperclip'
gem "iconv", "~> 1.0.3"
gem 'gravtastic'

gem 'execjs'
gem 'nokogiri'
gem 'twilio-ruby'

gem 'private_pub'
gem 'thin'
gem 'json', '~> 1.8.3'

gem 'redis'
gem 'resque', :require => "resque/server"
gem 'resque-scheduler'
gem 'resque-cleaner'
gem 'redis-mutex'
gem 'redis-classy', '~> 2.2.0'

gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc


group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'

gem 'spring'
gem 'god'
end

最佳答案

如果没有看到有问题的 cron 作业,很难发表评论。你正在使用 RVM;有没有可能你没有在你的 cron 工作中调用正确的 ruby ?如果不是,它可以解释为什么您的 Web 应用程序运行良好,但您的后台作业却失败了。

Missing required gems when execute cron created by whenever gem in production environment

https://coderwall.com/p/vhv8aw/getting-ruby-scripts-working-with-bundler-rvm-and-cron

关于ruby-on-rails - 无法在任何来源中找到 json-1.8.3 (Bundler::GemNotFound),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32834898/

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