Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicated key at line 80 ignored: "name" rvm

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.

like image 666
Alec Wilson Avatar asked Mar 06 '15 23:03

Alec Wilson


1 Answers

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/

like image 172
BigRon Avatar answered Sep 28 '22 09:09

BigRon