Skip to content

Instantly share code, notes, and snippets.

@jkutner
Created May 1, 2012 18:20
Show Gist options
  • Save jkutner/2570232 to your computer and use it in GitHub Desktop.
Save jkutner/2570232 to your computer and use it in GitHub Desktop.
fcntl fix
begin
require 'fcntl'
rescue LoadError
# This traps an error brought on by some combination of TorqueBox and the
# twitter Gem on Mac OS X. The bug is difficult to reproduce consistently
# and is recorded here: http://jira.codehaus.org/browse/JRUBY-5753
# By trapping the error early on like this, it allows the second load of the
# 'fcntl' lib, which happens inside the twitter Gem, to be successful.
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment