忽略第 80 行的重复键:“name"房车 [英] Duplicated key at line 80 ignored: "name" rvm

查看:46
本文介绍了忽略第 80 行的重复键:“name"房车的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎没有影响任何事情,只是在我的终端中很烦人 - 我经常收到以下警告(有时我收到多个,调用不同的行,有时是 /gem/ 各不相同,但除此之外,这是输出:

This doesn't seem to have affected anything, it's just irritating in my terminal - I regularly receive the following warning (sometimes I receive multiple, calling out different lines, and sometimes the path after /gem/ varies, but other than that, this is the output:

/Users/alecwilson/.rvm/gems/ruby-2.2.1/gems/fog-1.23.0/lib/fog/rackspace/mock_data.rb:42: 警告:第 80 行的重复键被忽略:名称"

在捆绑和运行 rake test 时最常见.关于如何修复它的任何想法?我通常对在我的 .rvm 目录中编辑文件非常谨慎,因为我之前已经把它搞砸了,但有时仍然会收到关于我的 PATH 设置不正确的警告(但只是偶尔).如果有人能带我了解导致这种情况的原因,我将不胜感激.

It's most common when bundling and running rake test. Any idea on how to fix it? I'm generally pretty wary of editing files in my .rvm directory, as I've royally screwed it up before, and still sometimes get a warning about my PATH being incorrectly set up (but only occasionally). If anyone can walk me through what is causing this, I'd be very grateful.

推荐答案

正如@jBeas 在评论中所说,去寻找最新的雾 gem 版本 https://rubygems.org/gems/fog

As @jBeas said in the comments go find the latest fog gem version https://rubygems.org/gems/fog

然后更新你的 rails gemfile 中的fog gem,目前你的fog gem 应该是:

Then update the fog gem in your rails gemfile, currently your fog gem should be:

gem 'fog', '1.38.0'

对于遵循 Rails 4 的 Rails 教程的用户来说,这曾经是一个反复出现的错误,教程指导用户使用过时版本的 Fog gem,1.23.0(这是编写 Rails 教程时的更新版本).

This used to be a recurring error for users who had followed along with the Rails Tutorial for Rails 4 where the Tutorial guided the users to use an outdated version of the Fog gem, 1.23.0 (it was the updated version at the time the Rails Tutorial was written).

现在 rails 教程最近针对 Rails 5 进行了更新,迷雾gem 目前是最新的:'1.38.0'.

Now that the rails tutorial has been recently updated for Rails 5 the fog gem is currently up to date: '1.38.0'.

来自 Rails 教程的更新

最新流行的智慧是使用 carrierwave-aws gem而不是 fog,显着减少您的应用程序的足迹.切换花了我大约 15 分钟,并将我的 gem 依赖减少了 33.从 Sidekiq 的创建者 Mike Perham 那里得到的建议:http://www.mikeperham.com/2016/02/09/kill-your-dependencies/

The latest prevailing wisdom is to use carrierwave-aws gem rather than fog, significantly reducing your app's footprint. The switch took me about 15 minutes and reduced my gem dependencies by 33. Advice taken from Mike Perham, the creator of Sidekiq: http://www.mikeperham.com/2016/02/09/kill-your-dependencies/

这篇关于忽略第 80 行的重复键:“name"房车的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆