Skip to content

Instantly share code, notes, and snippets.

@willglynn
Created April 23, 2014 16:48
Show Gist options
  • Save willglynn/11223105 to your computer and use it in GitHub Desktop.
Save willglynn/11223105 to your computer and use it in GitHub Desktop.
Using a vendored zbar binary in Rails
# Point zbar to the vendored copy of libzbar
ENV['ZBAR_LIB'] ||= Rails.root.join('vendor', 'zbar', 'lib', 'libzbar.so')
# Load the gem
require 'zbar'
source 'https://rubygems.org'
# ...
# zbar needs an environment variable, so don't require it automatically
gem 'zbar', require: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment