I followed the following steps to deal with the same issue. I would suggest doing the same
- Add ffi to your local gemfile, specifying its version to be 1.9.0, e.g.
gem 'ffi', '= 1.9.0'
- Uninstall version 1.9.3 from your local box
gem uninstall ffi -v 1.9.3
- Run
bundle update ffi
- Commit the changes
- Push the changes to heroku.