Quick Start
Basic Usage – “Hello Doom”
- Install GemInstaller:
[sudo] gem install geminstaller - Create a
geminstaller.ymlfile:
--- # geminstaller.yml sample config gems: - 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
RAILS 2.0 INSTRUCTIONS:
- Follow the Basic Usage instructions above to install the GemInstaller gem and create a
config/geminstaller.ymlfile 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
sudoersfile to allow the current user to run the'gem'command via sudo without a password. See the documentation on the GemInstaller--sudooption for more details.
- Create a
config/preinitializer.rbfile to invoke GemInstaller on your Rails app startup:
RAILS_ROOT/config/preinitializer.rb:
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]
- For an example, check out the Sample Rails App in the GemInstaller source.
OLD RAILS 1.0 INSTRUCTIONS:
Where to go next
See the Tutorials or the Detailed Documentation for examples of more GemInstaller features.