Frequently Asked Questions
Q: Why not just use Rails’ config.gems and rake tasks instead of GemInstaller?
A: I’ll come up with a feature comparison chart sometime. For now, I’ll mention a few reasons: 1) Rails itself cannot manage the Rails gems – but GemInstaller can via preinitializer.rb. 2) GemInstaller has more features that config.gems. 3) GemInstaller runs for any app or environment that needs to manage RubyGems, not just Rails. Like Merb! If you only use Rails, and none of these things matter to you, maybe you should consider using the Rails support :)
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 (http://thewoolleyweb.lighthouseapp.com/projects/11580/tickets/1-automatically-create-use-and-manage-writeable-gem-home-if-system-gem-home-is-not-writeable)
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: http://rmagick.rubyforge.org/
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/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.