Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

About 50% of the time, when I run bundle (or bundle exec foo) I get an error like the following:

> bundle
/usr/local/Cellar/ruby/1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': No such file or directory - /usr/local/lib/?y (Errno::ENOENT)
    from /usr/local/Cellar/ruby/1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/Cellar/ruby/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler.rb:8:in `<top (required)>'
    from /usr/local/Cellar/ruby/1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/Cellar/ruby/1.9.3-p374/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /usr/local/Cellar/ruby/1.9.3-p374/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/bin/bundle:2:in `<top (required)>'
    from /usr/local/bin/bundle:23:in `load'
    from /usr/local/bin/bundle:23:in `<main>'

To me it smells like memory corruption in the construction of the require path but I don't know why this would happen only when using Bundler and not with vanilla Ruby. I'm aware that Bundler patches Kernel.require but the bug (as per the trace above) appears to happen before the path gets handed to that method.

Versions of software I have:

> ruby --version
ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-darwin12.2.0]
> gem list bundler

*** LOCAL GEMS ***

bundler (1.2.3)

I don't have rvm/rbenv/etc installed and there are only two rubies on the box, the homebrew installed one and the system one.

share|improve this question

I also had this problem. Doing gem install bundler --pre fixed it for me.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.