Homebrew, ruby 2.0.0p648, nokogiri 188.8.131.52 are installed. When require 'nokogiri' there appears an error:
-bash: require: command not found
You can't run a Ruby command directly in bash. If you want to use Ruby at command line, open the Ruby shell irb.
and then you'll see the prompt
2.3.0 :001 >
The first number indicates the Ruby version you are using. In my case it is Ruby 2.3.0. The second number is the command number.
Then you may type
and it surely work, if you have this gem installed.