I am trying to use Ruby Uglifier gem, but it's giving this warning and the output javascript is not minified:
/usr/lib/ruby/gems/1.8/gems/uglifier-1.2.7/lib/uglifier.rb:51: warning: encoding options not supported in 1.8: r:UTF-8
The easiest answer for this is you need to upgrade to ruby 1.9. 1.8 does not support specifying a character encoding.
Tl;dr
The person who made this gem did not properly specify the supported Ruby versions in their gemspec
when they built the gem, so it allowed you to install it, but it will be non-functioning due to the hard coded UTF-8
encoding. You could possibly edit the gem to remove this, but there is no guarantee that it would work, as they may be using UTF-8 specific characters in the gem somewhere. I highly recommend upgrading to 1.9.