AFAIK the balanced gem is just a ruby wrapper that provides you with convenience methods for hitting their API so that you don't have to make raw HTTP requests.
If you don't want to download balanced.js
, you can just include it in app/views/layout/application.html.erb
as they recommend in their documentation:
<script type="text/javascript" src="https://js.balancedpayments.com/v1/balanced.js"></script>
This jsFiddle, also from the documentation, contains a working demo with all the html and javascript needed for functional credit card tokenization.