Skip to content
This repository has been archived by the owner on Mar 21, 2018. It is now read-only.

Gem::Specification.load returning nil #6

Closed
JackuB opened this issue Jul 29, 2015 · 5 comments
Closed

Gem::Specification.load returning nil #6

JackuB opened this issue Jul 29, 2015 · 5 comments

Comments

@JackuB
Copy link
Contributor

JackuB commented Jul 29, 2015

In version 0.4.2 I've encountered this error:

updating algolia index
/Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/push.rb:129:in `set_user_agent_header': undefined method `version' for nil:NilClass (NoMethodError)
    from /Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/push.rb:135:in `create_index'
    from /Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/push.rb:163:in `push'
    from /Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/push.rb:94:in `write'
    from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:53:in `process'
    from /Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/algoliasearch-jekyll.rb:32:in `block (3 levels) in init_with_program'
    from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
    from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
    from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
    from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
    from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
    from /usr/bin/jekyll:23:in `load'
    from /usr/bin/jekyll:23:in `<main>'

Could be same issue as this one in rubygems: rubygems/rubygems#1287

When I overwrite version in push.rb to string, it works.

@pixelastic
Copy link
Contributor

Thanks for the report. Are you using bundler?

If so, could you try with bundle exec jekyll algolia push?

On Wed, Jul 29, 2015 at 2:53 PM, Jakub Mikulas notifications@github.com
wrote:

In version 0.4.2 I've encountered this error:

updating algolia index
/Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/push.rb:129:in `set_user_agent_header': undefined method `version' for nil:NilClass (NoMethodError)
  from /Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/push.rb:135:in `create_index'
  from /Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/push.rb:163:in `push'
  from /Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/push.rb:94:in `write'
  from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:53:in `process'
  from /Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/lib/algoliasearch-jekyll.rb:32:in `block (3 levels) in init_with_program'
  from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
  from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
  from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
  from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
  from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
  from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
  from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
  from /usr/bin/jekyll:23:in `load'
  from /usr/bin/jekyll:23:in `<main>'

Could be same issue as this one in rubygems: rubygems/rubygems#1287

When I overwrite version in push.rb to string, it works.

Reply to this email directly or view it on GitHub:
#6

@JackuB
Copy link
Contributor Author

JackuB commented Jul 29, 2015

Running bundle exec jekyll algolia push: Fails
Running bundle exec rake update_search: Fails
Running rake update_search: Fails

This is our Rakefile:

desc 'Update algolia index'
task :update_search do
  puts 'updating algolia index'
  puts `bundle exec jekyll algolia push -t`
end

@pixelastic
Copy link
Contributor

@JackuB Do you mind jumping on the livechat in algolia.com so I can troubleshoot that with you?

@pixelastic
Copy link
Contributor

@JackuB I've just released v0.4.3 that should hopefully fix it. It no longer needs rubygems to known the version.

Just out of curiosity, could you send me a ls of the /Library/Ruby/Gems/2.0.0/gems/algoliasearch-jekyll-0.4.2/ folder?

I could not reproduce on my end, but I have the feeling the file I was reading is not there. Did you had the error locally on your machine or in a CI environment?

@JackuB
Copy link
Contributor Author

JackuB commented Jul 30, 2015

Thanks! I was getting this error locally, didn't try CI - 0.4.3 works, closing this one.

@JackuB JackuB closed this as completed Jul 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants