env: ruby_bundler_wrapper: No such file or directory

I spent bunch of time scratching my head, trying to figure out why my ruby executables (rails, heroku, etc) weren’t working. I thought it was because I had an old custom shebang in my .gemrc, but that didn’t seem to change anything. I ran gem regenerate binstubs and that didn’t help either. I still to this day don’t even know what package provides ruby_bundler_wrapper, or even where it lives.

BUT, I figured out the problem for me was that I had my gems stored in a global rvm gemset, so I had to regenerate the binstubs in there:

rvm @global do rvm regenerate binstubs

And that seemed to do the trick. Long morning of system administration today.

Tags: , , ,

2 Responses to “env: ruby_bundler_wrapper: No such file or directory”

  1. Lewis Flude Says:

    Hey there. When I try this I get a message telling me that regenerate is not a valid command line argument.

    Unrecognized command line argument: ‘regenerate’ ( see: ‘rvm usage’ )

    Just wondering if you knew a workaround…

    Thanks,

    Lewis

  2. Jon Moter Says:

    Check to see whether those commands have been aliased by your shell. I run zsh with oh-my-zsh, and it provides aliases for ruby commands, so they’re automatically run with bundler.

    $ which ruby ruby: aliased to bundled_ruby
    $ which bundled_ruby bundled_ruby () {
    _run-with-bundler ruby $@
    }

    You might have something similar going on with your dotfiles.

Leave a Reply