Duplicated key at line 80 ignored: "name" rvm
Asked Answered
P

1

7

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: warning: duplicated key at line 80 ignored: "name"

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.

Pahlavi answered 6/3, 2015 at 23:58 Comment(3)
Looks like you have a few issues. Your question isn't as clear as it could be. The main error you are getting is related to the gem. Make sure your gem version is up to date. If it's up to date then I'd post to then github project for the gem letting the maintainers of the project know.Vaden
For your path concerns you should check out some of the peepcode videos on the shell/command line. They are awesome you'll learn a ton and be more confident about paths, bash, and a number of other things you've seen or used before. It will save you a significant amount of time in the future and make you better.Vaden
Just so you know it's the fog gem I was referring to, you can see it in the path.Vaden
V
16

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

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

gem 'fog', '1.38.0'

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).

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

UPDATE for those coming from Rails Tutorial

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/

Varro answered 22/3, 2015 at 15:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.