开发者

Installing ruby executables via bundler puts them in a different location than gem install

Having some issues installing a gemset in ruby 1.8.7p334 (enterprise edition) running rails 1.2.6 on Fedora 8.

The main issu开发者_JAVA百科e I have is that bundler installs the executables in /usr/lib/ruby/gems/1.8/bin. However, Gem installs the executables in /usr/bin, which is where I want them.

How can I tell bundler to place them in /usr/bin? I've looked at the --binstubs flag, but it doesn't seem to complete the necessary requirements.

Any help is much appreciated.

RubyGems Environment:
  - RUBYGEMS VERSION: 1.5.2
  - RUBY VERSION: 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/


Of course I find the answer after posting the question. It's the little-documented BUNDLE_BIN configuration key. It can be set by .bundle/config, an environment variable (my choice) or by bundle config. Looks like you can also specify it on the command line as --bin.

$ export BUNDLE_BIN="/usr/bin"

bin (BUNDLE_BIN) Install executables from gems in the bundle to the specified directory. Defaults to false.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜