Creando la Estructura Inicial de la Gema

gem install bundler
Once you've installed Bundler, you should change directories to the location that you want to create your gem folder (for me, that location is ~/code/gems).

Once there you will create the gem like so:

bundle gem my_gem
Where my_gem is your gem's name. Note that if you are building a command line tool you should add the -b flag to this command (bundle gem my_gem -b).

You should see output that looks something like this:

      create  my_gem/Gemfile
      create  my_gem/Rakefile
      create  my_gem/.gitignore
      create  my_gem/my_gem.gemspec
      create  my_gem/lib/my_gem.rb
      create  my_gem/lib/my_gem/version.rb
Initializating git repo in /Users/mbleigh/code/gems/my_gem
Bundler has just generated a skeleton for your gem. You should recognize many of the files of the general structure of a gem.

Some of the nice things that Bundler has done for us include:

Casiano Rodriguez León 2015-06-18