Guess a number, any number, between 1 and 10
Global variables

Don't use global variables(like $bar). It is always bad practice because you can mutate the global variable from anywhere. The alternative is:
RANDOM_NUMBER = rand(1..10), notice that you can pass range as an argument of rand. rand(10) + 1 can return 11 so it isn't correct.

Style

Huge percentage of the Ruby community follow the style guide and this
is the most popular one Ruby style guide.

Style issues: 


Use snake case for the names of methods and variables.
Use double quotes only if you use interpolation or special symbols like \n.


About the implementation

IMO will be more readable like this:  

def guess_random_number
  puts 'Guess a number between 1 and 10'

  random_number = rand(1..10)

  while random_number != (guess_number = gets.to_i)
    if guess_number &lt; random_number
      puts "too low \nplease, guess again"
    else
      puts "too high \nplease, guess again"
    end
  end

  puts "Right on, good guess \nbye"
end

guess_random_number


You see there is no need to expose the variable in the global scope.