Mastermind game - Evaluating the guess in Ruby
There are definitely some inefficiencies in your code, but it's a good start. The first thing I'd say is that there is no reason for you to create variables black and white in calculate_feedback. All they hold is the names of the colors and it's no more efficient. The issue is that you seemed to have started to code this before fully thinking of the implementation. 

From a basic perspective, here are the rules:


Guesser has 12 guesses
Each guess gets compared to the correct code
If the guess is the correct color in the correct position a black peg comes up in that spot, otherwise a white peg comes up (at most once per color).


So, let's break this down into an algorithm.


Create secret code and create counter for user's guesses
Get user's guess
Compare user's guess to secret code.
Go back to step 2 until the user either guessed the code correctly or has hit 12 guesses.


The biggest part of the algorithm to focus on is part 3, which is comparing the user's guess to the secret code. Luckily, because you're using Ruby, you have some great resources for this. Let's break this step down into two parts. 

First: Find out how many black pegs should be there. This can be done with one line in ruby. 

black = code.zip(guess).count{|i| i.inject(:eql?)}


This might look a bit confusing but what it does is it takes the secret code (represented by the array code and zips it into an array with guess. So for the above example code.zip(guess) would give us [["Red", "Blue"], ["Blue", "Green"], ["Green", "Red"], ["Red", "Red"]]. Then count{|i| i.inject(:eql?)} means count all of the arrays within the array where the elements are equal. This is only true for ["Red", "Red"] and so it gives us a count of 1 which is the number of black pegs to be returned. Now, we have to talk about the white pegs. Because there can be at most 1 per color guessed, we should consider eliminating duplicates in the array of the user's guess. Thus, we can do this

white = guess.uniq.count{|i| code.include?(i)}


So great, with only two lines we have the number of white and black pegs we need for each turn. Now let's put this all together into a concise program.

def provide_feedback(code, guess)
  black = code.zip(guess).count{|i| i.inject(:eql?)}
  white = guess.uniq.count{|i| code.include?(i)}
  result = Array.new(4, '')
  black.times { result.unshift('black').pop }
  white.times { result.unshift('white').pop }
  result
end


Of course, this is still a bit more verbose than I'd prefer. Why not tighten it up a bit more by removing the black and white variables all together.

def provide_feedback(code, guess)
  result = Array.new(4, '')
  code.zip(guess).each{|i| result.unshift('black').pop if i.inject(:eql?)}
  guess.uniq.each{|i| result.unshift('white').pop if code.include?(i) &amp;&amp; result[-1] == ''}
  result
end


That's the most concise and Ruby way I could think of.