0

Checkr is the gem I have built recently and code is hosted in github and gem is hosted in rubygems.org. If we install it using bundler, specifying gem 'checkr' in Gemfile, it is not loading. We get this error:

uninitialized constant Checkr (NameError)

But installing it from github like this in Gemfile works fine, I guess.

gem 'checkr', git: 'https://github.com/vijendra/checkr.git'

Am I missing some thing in rubygems.org settings?

Robin
  • 8,162
  • 7
  • 56
  • 101
Vijendra
  • 338
  • 3
  • 11
  • It sounds like you haven't published your gem to rubygems.org... Have you followed this guide? http://guides.rubygems.org/publishing/ – CDub Oct 23 '14 at 05:54
  • It is hosted. https://rubygems.org/gems/checkr Am I missing some thing? – Vijendra Oct 23 '14 at 05:56
  • May just need time to propagate then. :). I'm not sure - I'm guessing at this point. – CDub Oct 23 '14 at 05:58

1 Answers1

2
$ gem install checkr
Successfully installed checkr-0.0.2
1 gem installed

$ ruby -e "require 'checkr'"
/Users/radarek/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121:in `require': cannot load such file -- checkr/base (LoadError)
        from /Users/radarek/.rbenv/versions/2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:121:in `require'
        from /Users/radarek/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/checkr-0.0.2/lib/checkr.rb:1:in `<top (required)>'

$ ls /Users/radarek/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/checkr-0.0.2/lib/checkr/
candidate.rb  core_ext.rb  report.rb  subaccount.rb  version.rb

As you see your gem release has missing base.rb file. I cloned your github repo and build gem locally. This gem has all files from lib/checkr/ included so you just have to release new version of your gem and it will work.

radarek
  • 2,478
  • 2
  • 17
  • 12