Frequently Asked Questions

Q: I got an error “source index cannot be created from disk”

A: This is an incompatibility introduced in recent versions of RubyGems. Upgrade to the latest version of GemInstaller.

Q: GemInstaller is taking FOREVER to run!

A: First, run with the ‘-gall -rall’ options to see all verbose output. It is probably the underlying RubyGems command that is slow. If you are on a version of RubyGems which is earlier than 1.2.0, there are know cache performance problems, and you should upgrade. This little script may help

Q: Why not just use Rails’ config.gems and rake tasks instead of GemInstaller?

A: A few reasons: 1) There are known issues with config.gems, since it attempts to load dependencies while the Rails environment is initializing, resulting in the possibility of circular dependencies. GemInstaller does not have these issues when run from config/preinitializer.rb. 2) Rails itself cannot manage the Rails gems – but GemInstaller can via preinitializer.rb. 3) GemInstaller has more features that config.gems. 4) GemInstaller runs for any app or environment that needs to manage RubyGems, not just Rails. See more discussion on this rails core list thread or this rails ticket

Q: Why can’t I use environment variables via ERB in geminstaller.yml when using sudo?

A: For security, the sudo command does NOT pass most environment variables. That means if you are trying to use an environment variable to control logic in your geminstaller.yml (for example to dynamically specify a gem version), then it won’t work! The workaround would be to not use sudo (

Q: Why do some gems (like BlueCloth) always get reinstalled, even though they are already installed?

A: Dunno, this is either a bug in the gem or in RubyGems. It isn’t a problem with GemInstaller AFAIK, it happens even if you install manually via ‘gem install’. Haven’t had time to debug, let me know if you figure it out.

Q: What about gems like RMagick that have platform-specific binary dependencies?

A: You are on your own, this is outside of the scope of GemInstaller. The geminstaller.yml file is parsed with ERB, so you can put whatever hooks you want to perform necessary system setup and/or prereq validation. You can also google or check the RMagick home page: For Debian systems, check out the AptInstaller tool.

Q: Why don’t the tests/specs run on Windows?

A: This has been improved with GemInstaller 0.3.0. Using RubyGems 1.0.1 on Windows, install_smoketest.rb, autogem_smoketest.rb, and ruby test_suites/test_all.rb all work. See references to ‘windows’ on the Code Page for more details.

Q: Why else should I support GemInstaller?

A: GemInstaller has an extensive, multifaceted and multiplatform suite of specs and tests which is actively maintained against the latest trunk version of RubyGems and run via Continuous Integration. It is valuable for alerting about regressions in RubyGems itself. For example, leading up to the the RubyGems 1.2.0 release, the GemInstaller spec suite identified several regression bugs in RubyGems which were promptly reported and proactively fixed by awesome Eric Hodel and others before the release.

This space intentionally left blank.