Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Warning on Windows #8

djberg96 opened this Issue · 5 comments

2 participants


Windows Vista
ruby 1.8.6 (2009-08-04 patchlevel 383) [i386-mingw32]

When I fire up ripl on Vista I see this:

Bond Error: Failed to load readline_line_buffer.bundle. Ensure that it exists and was built correctly.

I'm guessing there's some sort of "win" vs "darwin" mistake happening somewhere based on the ".bundle" extension, since that's a Darwin shared object extension.




I see where it's coming from now. The warning was a bit misleading. The ".bundle" is just something you wrote directly in the warning. I would recommend changing line 27 of readline.rb to:

warn "Failed to load readline_line_buffer. Ensure that it exists and was built correctly."

I also wonder if your C extension is really the best way to go. For something so small I would consider FFI, or perhaps rely on the pure Ruby readline library instead, so you can just reopen the class and use plain Ruby.


Here's an ffi version:

require 'readline'
require 'ffi'

module Readline
  extend FFI::Library
  ffi_lib 'readline'
  attach_variable :rl_line_buffer, :string

  def line_buffer

  module_function :line_buffer

Will tweak the warning. As for the c extension, I'd like it to be dependency free. If an ffi extension opens up bond to additional platforms, I could offer it as an alternative extension toggleable by ENV['BOND_FFI'], like nokogiri used to do. Do you know of any platforms bond doesn't work on now that would benefit from ffi?


Right now it would work on Windows, but would require mingw and/or a binary distribution, though that's only if readline is installed.

I think the same thing could be accomplished with DL (part of the stdlib), but I'm not sure how yet. It would at least eliminate the dependency. I'm not sure why avoiding a dependency is an issue, though. Without FFI, the compiler becomes the dependency. I'd rather make it a gem. :)

Another option would be to eschew Readline altogether and use rawline.


Closing this as jruby and windows now have viable alternatives: jruby uses JLine and windows uses rb-readline.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.