ShockwaveNN ShockwaveNN - 6 months ago 14
Ruby Question

Gem installed from github sources not shown in `gem list`

I trying to install some gem from github sources, it is installed succesfully, but after that it is not shown in

gem list
output and cannot be required.

My gem is in private repo, but I can reproduce those steps on random public repo.
For example:


  1. I create Gemfile with content:




source 'http://rubygems.org'
gem 'http_parser.rb', git: 'https://github.com/tmm1/http_parser.rb.git'




  1. I call
    bundle install
    and it's output is:




Fetching https://github.com/tmm1/http_parser.rb.git
Fetching gem metadata from http://rubygems.org/.........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Using http_parser.rb 0.6.0 from https://github.com/tmm1/http_parser.rb.git (at master@10dd2ed)
Using bundler 1.11.2
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.




  1. After that I call
    gem list | grep http
    and get nothing. Also I cannot call
    require "http/parser"
    in my code, it cannot be found.



What did I done wrong?

Answer

Thanks @stefan,
require 'bundler/setup' solved my problem