{"action":"created","issue":{"url":"https://api.github.com/repos/willglynn/ruby-zbar/issues/8","labels_url":"https://api.github.com/repos/willglynn/ruby-zbar/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/willglynn/ruby-zbar/issues/8/comments","events_url":"https://api.github.com/repos/willglynn/ruby-zbar/issues/8/events","html_url":"https://github.com/willglynn/ruby-zbar/issues/8","id":36659642,"number":8,"title":"Q:Heroku Zbar Didn't find libzbar on your system (LoadError)","user":{"login":"yoshidaagri","id":3285625,"avatar_url":"https://avatars.githubusercontent.com/u/3285625?v=3","gravatar_id":"","url":"https://api.github.com/users/yoshidaagri","html_url":"https://github.com/yoshidaagri","followers_url":"https://api.github.com/users/yoshidaagri/followers","following_url":"https://api.github.com/users/yoshidaagri/following{/other_user}","gists_url":"https://api.github.com/users/yoshidaagri/gists{/gist_id}","starred_url":"https://api.github.com/users/yoshidaagri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoshidaagri/subscriptions","organizations_url":"https://api.github.com/users/yoshidaagri/orgs","repos_url":"https://api.github.com/users/yoshidaagri/repos","events_url":"https://api.github.com/users/yoshidaagri/events{/privacy}","received_events_url":"https://api.github.com/users/yoshidaagri/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2014-06-27T12:34:50Z","updated_at":"2015-08-08T19:57:40Z","closed_at":"2015-03-16T23:53:08Z","body":"I have a rails application which uses zbar. It works fine on my developer machine But when i tried to deploy it to Heroku my commit was rejected with the following message:\r\n\r\napp/web.1:  /app/vendor/bundle/ruby/2.0.0/gems/zbar-0.2.2/lib/zbar/lib.rb:12:in `rescue in <module:ZBar>': Didn't find libzbar on your system (LoadError) \r\napp/web.1:  Please install zbar (http://zbar.sourceforge.net/) or set ZBAR_LIB if it's in a weird place \r\napp/web.1:  FFI::Library::ffi_lib() failed with error: library names list must not be empty \r\napp/web.1:  from /app/vendor/bundle/ruby/2.0.0/gems/zbar-0.2.2/lib/zbar/lib.rb:9:in `<module:ZBar>' \r\n\r\nHere is my gemfile;\r\ngem 'zbar', '~> 0.2.2'\r\n\r\nmy /.buildpacks:\r\nhttps://github.com/ballantyne/heroku-buildpack-zbar \r\nhttps://github.com/heroku/heroku-buildpack-ruby.git\r\n\r\n\r\nWhy does this happen?\r\nThanks."},"comment":{"url":"https://api.github.com/repos/willglynn/ruby-zbar/issues/comments/129041615","html_url":"https://github.com/willglynn/ruby-zbar/issues/8#issuecomment-129041615","issue_url":"https://api.github.com/repos/willglynn/ruby-zbar/issues/8","id":129041615,"user":{"login":"willglynn","id":118362,"avatar_url":"https://avatars.githubusercontent.com/u/118362?v=3","gravatar_id":"","url":"https://api.github.com/users/willglynn","html_url":"https://github.com/willglynn","followers_url":"https://api.github.com/users/willglynn/followers","following_url":"https://api.github.com/users/willglynn/following{/other_user}","gists_url":"https://api.github.com/users/willglynn/gists{/gist_id}","starred_url":"https://api.github.com/users/willglynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willglynn/subscriptions","organizations_url":"https://api.github.com/users/willglynn/orgs","repos_url":"https://api.github.com/users/willglynn/repos","events_url":"https://api.github.com/users/willglynn/events{/privacy}","received_events_url":"https://api.github.com/users/willglynn/received_events","type":"User","site_admin":false},"created_at":"2015-08-08T19:57:40Z","updated_at":"2015-08-08T19:57:40Z","body":"A-ha! The `zbar` gem is getting loaded *in the slug compiler*, and in that context the `libzbar.so` lives at a different path and environment variables work differently.\n\nI'm guessing it's being loaded as part of `rake assets:precompile`, and I'd also guess it's not needed at all for asset compilation. Try excluding it from the `:assets` group, or making it `require: false` and load it only in the code that really does need it."}}