镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

binstubs stupport #117

Closed
Closed

Description

@jyurek

Using chruby masks binstubs installed per-project (http://robots.thoughtbot.com/post/15346721484/use-bundlers-binstubs). I see in the contribution guidelines that you want to cut down on environment variable proliferation, which I agree with, but allowing a sub-path that gets prepended to the modified PATH each time ruby is changed seems most appropriate for this problem. I'd like to submit a pull request for this, but I'm not sure this approach would be accepted. Any advice?

Activity

  1. postmodern commented on Mar 8, 2013

    @postmodern
    Owner

    If the binstubs are generated by bundler, that is bundler's responsibility. They should ship their own little bash script that detects .bundle and adds bin/ to PATH.

  2. postmodern commented on Apr 17, 2013

    @postmodern
    Owner

    Actually, rubygems-bundler replaces the need for generate binstubs or using bundle exec. Just tested it on a project and it works perfectly with chruby.

  3. postmodern commented on Apr 17, 2013

    @postmodern
    Owner

    After talking to @wycatz, he actually recommends explicitly running ./bin/rake or bundle exec rake. This forces the user to choose whether they want to run system rake or bundled rake. A common case for this is bootstrapping a project via rake setup. However, most people will avoid the extra typing by dangerously adding ./bin to $PATH or using a bundler plugin (rubygems-bundler, rbenv-bundler or rbenv-binstubs).

  4. FranklinYu commented on Sep 6, 2016

    @FranklinYu
    Contributor

    It's interesting that rails now respect binstubs (tried with Rails 5.0.0.1). It might be slightly less dangerous to allow only a whitelist in ./bin (such as rails, rake and puma) so that important binaries like less and cat won't be overrided.

    Note: I am not using Bundler's binstubs, but Spring's. This functionality is not covered by bundle exec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions