Try as below:
$driver.find_elements(:css, 'div.class1.class2')
Just to give a live example, I used the Ruby_on_Rails wikipedia link and wrote a code to access the below html table from the link mentioned.
HTML
<table class="wikitable sortable jquery-tablesorter" align="left">
<caption>Version history</caption>
<thead>
<tr>
<th class="headerSort" title="Sort ascending">Version</th>
Ruby code
require 'selenium-webdriver'
driver = Selenium::WebDriver.for :firefox
driver.navigate.to "http://en.wikipedia.org/wiki/Ruby_on_Rails"
elem = driver.find_element(:css, 'table.wikitable.sortable.jquery-tablesorter')
p elem.tag_name
# => "table"
p elem.find_element(:tag_name, 'caption').text
# => "Version history"