How to put a .gem in Gemfile

0

Good afternoon, I have a problem installing a .gem through Gemfile. In Gemfile you are:

gem 'hanaclient', path: '/usr/sap/hdbclient/ruby/hanaclient'

Inside the / usr / sap / hdbclient / ruby / hanaclient (ls):

hanaclient-2.3.119-x86_64-linux.gem

When you run bundle install , it returns:

Could not find gem 'hanaclient' in source at '/usr/sap/hdbclient/ruby/hanaclient'.
The source does not contain any versions of 'hanaclient'

Any solution? Thank you.

    
asked by anonymous 02.10.2018 / 18:10

1 answer

0

The problem is occurring because it is pointing to a .gem file, and it should be unpacked. Therefore:

gem unpack my_gem.gem --target app_path/vendor/gems

Once unpacked, just refer to Gemfile :

gem 'my_gem', :path => 'vendor/gems/my_gem'
  

Just a note: You are trying to list a local gem in Gemfile . Usually this causes problems between different environments and is not recommended.

    
03.10.2018 / 06:04