Disable Rdoc and Ri Generation by Default for Rubygems 1.8.X

Problem requiring the RMagick gem with Ruby

I had the very same problem in Ruby 1.8.7 as you with 1.9.1. This is a way I've resolved it:

  1. Uninstall the rmagick gem if you have it (gem uninstall rmagick)
  2. Download http://rubyforge.org/frs/download.php/64917/RMagick-2.12.0-ImageMagick-6.5.6-8-Q8.zip
  3. Unpack the zip to separate folder (e.g. C:\temp\rmagick)
  4. Install the ImageMagick-6.5.6-8-Q8-windows-dll.exe
  5. Unpack the rmagick-2.12.0-x86-mswin32.gem to separate folder (e.g. C:\temp\rmagick\gem)
  6. Extract the data.tar.gz to separate folder (e.g. C:\temp\rmagick\gem\data)
  7. Open rmagick.gemspec and remove the line with s.platform = "mswin32"
  8. Use "gem build rmagick.gemspec" to build the gem again (a "rmagick-2.12.0.gem" will be generated)
  9. Use "gem install rmagick --local" to install it.

Can gem install be configured to install executables outside /usr/bin/ by default?

See http://www.rubygems.org/read/chapter/11 and specify a ~/.gemrc which defines a gemhome variable.

For example:

gemhome: /usr/local/rubygems

You can also place this file in /etc/gemrc

Alternatively you can set the GEM_HOME env-variable:

$ export GEM_HOME=/tmp/gemtest
$ gem install bundler
$ ls /tmp/gemtest/bin/
bundle

Update (10 years later):

Andrey Rodionov below suggest using

gem: --bindir /usr/bin


Related Topics



Leave a reply



Submit