Created
April 23, 2014 16:48
-
-
Save willglynn/11223105 to your computer and use it in GitHub Desktop.
Using a vendored zbar binary in Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Point zbar to the vendored copy of libzbar | |
ENV['ZBAR_LIB'] ||= Rails.root.join('vendor', 'zbar', 'lib', 'libzbar.so') | |
# Load the gem | |
require 'zbar' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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