Quick Start

Basic Usage – “Hello Doom”

  • Install GemInstaller: [sudo] gem install geminstaller
  • Create a geminstaller.yml file:
      # geminstaller.yml sample config
      - name: ruby-doom
        version: '>= 0.8'
  • Run GemInstaller from the directory containing geminstaller.yml: geminstaller. You should see a message indicating that the gem is being installed.
  • Verify that the ruby-doom gem was installed: gem list ruby-doom

Using GemInstaller with Ruby on Rails


  • Follow the Basic Usage instructions above to install the GemInstaller gem and create a config/geminstaller.yml file in your Rails app’s config directory
  • Determine whether you run on unix and need root/sudo access to install gems. If you do, edit your sudoers file to allow the current user to run the 'gem' command via sudo without a password. See the documentation on the GemInstaller --sudo option for more details.
  • Create a config/preinitializer.rb file to invoke GemInstaller on your Rails app startup:


  require 'rubygems'
  require 'geminstaller'
  # You can use the geminstaller_rails_preinitializer out of the GemInstaller gem:
  require 'geminstaller_rails_preinitializer'
  # If you require different geminstaller command options, copy the geminstaller_rails_preinitializer.rb
  # file into from the GemInstaller source into your Rails app, modify it, and require your customized 
  # version.  For example:
  # require "#{File.expand_path(RAILS_ROOT)}/config/custom_geminstaller_rails_preinitializer.rb"

  • Start your app: ruby script/server. You should see (depending on verbosity level) messages indicating the gems (and dependency gems) are being installed and auto-required.
  • Stop the app, and verify the gems are installed: gem list [some gem in your geminstaller.yml]


Where to go next

See the Tutorials or the Detailed Documentation for examples of more GemInstaller features.