What does a .gem file contain? How it is being used by Rails framework?
ruby, ruby-on-rails, ruby-on-rails-3, rubygems
Solution
You can see what is happening if you check the file on your file system.
In a Posix environment, you can check the file with the file command:
$: file bundler-1.3.0.gem
bundler-1.3.0.gem: POSIX tar archive
As you can see it is a tar archive. So it is a binary file, packaged and managed by the `gem` tool.
It is 'binary' so you will not see it as you may have expected.
You are correct though, and you can continue to think that it contains packaged ruby 'functions'.
Everything that you have told it to contain through your gemspec (however you included it) is there.
As far as how Rails uses the gemfile, it is used generally by installing the gem to your system, how ever that is done is partially dependent on your environment decisions.
Problem
I just created a test gem using bundle and it created a .gem file with unreadable content so I was wondering what does that .gem file contains ? is this binary data ? as I used to think that .gem files contains packaged ruby functions how is this .gem file being used by rails framework ? since it doesn't look like a module Thanks