I want to install compass by downloading any required file and taking them to another machine without internet connection. I have downloaded the source package
Thats exactly the problem I had.
After searching around a while I found a Solution who works using Bundler https://bundler.io/
Getting Gem with Dependencies:
source "http://rubygems.org"
gem 'rails', '3.2.1'
Install Gem on Machine without internet connection:
gem install --local rails-3.2.1.gem