Search code examples
rubyrubygemsinstallationbundlegemset

Bundle install, how to avoid using the library from source


I want to install a library to my rvm gemsets, but this library is not available using in the gem install. I have to install it from source

I do bundle install and it went well, except that It does not install the lib to the gemset but only the dependencies.

And I notice in the log this line Using xxx (a.b.c) from source at .

xxx is the library itself with version a.b.c and I can only use the library when I am in the source folder.

How to force to copy the library to the gemsets folder ?


Solution

  • You could do one of the following:

    1.: Use the :git option in your Gemfile for direct git(hub) access

    gem 'gemname', :git => 'git://github.com/foo'

    2.: Use the :path option in your Gemfile for local access

    gem 'gemname', :path => '/path/to/foo'

    3.: Install the local gem and use it in your Gemfile

    # command line
    gem install '/path/to/foo'
    
    # Gemfile
    gem 'foo'