gem list | egrep -v "^( |$)"
Here's a (trimmed) sample output:
$ gem list | egrep -v "^ |^$" *** LOCAL GEMS *** actionmailer (1.2.1, 1.2.0, 1.1.5) actionpack (1.12.1, 1.12.0, 1.11.2) actionwebservice (1.1.2, 1.1.1, 1.1.0, 1.0.0) activerecord (1.14.2, 1.14.1, 1.14.0, 1.13.2) activesupport (1.3.1, 1.3.0, 1.2.5) BlueCloth (1.0.0) capistrano (1.1.0) diff-lcs (1.1.2)