New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FloatDomainError: Infinity when trying to build an index #64

Closed
hendryque opened this Issue Apr 19, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@hendryque

hendryque commented Apr 19, 2018

Hey there,

I'm trying to implement this search in my Jekyll installation. Jekyll is v3.7.3 and everything else should be up to date as well. When I'm trying to build the index file, I see FloatDomainError: Infinity:

Configuration file: /Users/r/dev/_config.yml
Processing site...
bundler: failed to load command: jekyll (/usr/local/bin/jekyll)
FloatDomainError: Infinity
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/pager.rb:14:in `ceil'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/pager.rb:14:in `calculate_pages'
  /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:19:in `paginate'
  /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:15:in `build_subpages'
  /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:9:in `block in generate'
  /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:8:in `each'
  /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:8:in `generate'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.3/lib/jekyll/site.rb:174:in `block in generate'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.3/lib/jekyll/site.rb:172:in `each'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.3/lib/jekyll/site.rb:172:in `generate'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-algolia-1.3.4/lib/jekyll/algolia/overwrites/jekyll-algolia-site.rb:24:in `process'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-algolia-1.3.4/lib/jekyll-algolia.rb:73:in `run'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-algolia-1.3.4/lib/jekyll/commands/algolia.rb:31:in `block (2 levels) in init_with_program'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
  /usr/local/lib/ruby/gems/2.5.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
  /usr/local/lib/ruby/gems/2.5.0/gems/jekyll-3.7.3/exe/jekyll:15:in `<top (required)>'
  /usr/local/bin/jekyll:23:in `load'
  /usr/local/bin/jekyll:23:in `<top (required)>'

bundle exec jekyll algolia --verbose does that:

Configuration file: /Users/r/dev/_config.yml
         Requiring: /Users/r/dev/_plugins/jekyll-tagsgenerator.rb
         Requiring: /Users/r/dev/_plugins/jekyll-capitalize-all.rb
         Requiring: /Users/r/dev/_plugins/sitemap_generator.rb
         Requiring: /Users/r/dev/_plugins/jekyll-autgenerator.rb
         Requiring: jekyll-paginate
         Requiring: jekyll-feed
         Requiring: jekyll-typogrify
         Requiring: jekyll-email-protect
         Requiring: liquid_reading_time
         Requiring: nokogiri
         Requiring: json
         Requiring: mini_portile
Processing site...
       EntryFilter: excluded /Gemfile.lock.old
       EntryFilter: excluded /node_modules
       EntryFilter: excluded /README.md
       EntryFilter: excluded /Rakefile
       EntryFilter: excluded /package.json
       EntryFilter: excluded /gulpfile.js
       EntryFilter: excluded /Gemfile
       EntryFilter: excluded /Gemfile.lock
       EntryFilter: excluded /script.py
           Reading: _posts/2017-07-27-something.html
       EntryFilter: excluded /assets/css
jekyll 3.7.3 | Error:  Infinity

Running on a Mac with High Sierra, Ruby was installed with Brew. Could that be the issue here?

Thanks!

@hendryque

This comment has been minimized.

hendryque commented Apr 19, 2018

I did some things to make sure it is not a Brew error and reinstalled and updated everything with RVM. Error is basically the same but this is the new output:

Configuration file: /Users/r/dev/_config.yml
Processing site...
Traceback (most recent call last):
	22: from /Users/r/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:15:in `<main>'
	21: from /Users/r/.rvm/gems/ruby-2.5.1/bin/ruby_executable_hooks:15:in `eval'
	20: from /Users/r/.rvm/gems/ruby-2.5.1/bin/jekyll:23:in `<main>'
	19: from /Users/r/.rvm/gems/ruby-2.5.1/bin/jekyll:23:in `load'
	18: from /Users/r/.rvm/gems/ruby-2.5.1/gems/jekyll-3.7.3/exe/jekyll:15:in `<top (required)>'
	17: from /Users/r/.rvm/gems/ruby-2.5.1/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
	16: from /Users/r/.rvm/gems/ruby-2.5.1/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
	15: from /Users/r/.rvm/gems/ruby-2.5.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
	14: from /Users/r/.rvm/gems/ruby-2.5.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
	13: from /Users/r/.rvm/gems/ruby-2.5.1/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
	12: from /Users/r/.rvm/gems/ruby-2.5.1/gems/jekyll-algolia-1.3.4/lib/jekyll/commands/algolia.rb:31:in `block (2 levels) in init_with_program'
	11: from /Users/r/.rvm/gems/ruby-2.5.1/gems/jekyll-algolia-1.3.4/lib/jekyll-algolia.rb:73:in `run'
	10: from /Users/r/.rvm/gems/ruby-2.5.1/gems/jekyll-algolia-1.3.4/lib/jekyll/algolia/overwrites/jekyll-algolia-site.rb:24:in `process'
	 9: from /Users/r/.rvm/gems/ruby-2.5.1/gems/jekyll-3.7.3/lib/jekyll/site.rb:172:in `generate'
	 8: from /Users/r/.rvm/gems/ruby-2.5.1/gems/jekyll-3.7.3/lib/jekyll/site.rb:172:in `each'
	 7: from /Users/r/.rvm/gems/ruby-2.5.1/gems/jekyll-3.7.3/lib/jekyll/site.rb:174:in `block in generate'
	 6: from /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:8:in `generate'
	 5: from /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:8:in `each'
	 4: from /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:9:in `block in generate'
	 3: from /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:15:in `build_subpages'
	 2: from /Users/r/dev/_plugins/jekyll-tagsgenerator.rb:19:in `paginate'
	 1: from /Users/r/.rvm/gems/ruby-2.5.1/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/pager.rb:14:in `calculate_pages'
/Users/r/.rvm/gems/ruby-2.5.1/gems/jekyll-paginate-1.1.0/lib/jekyll-paginate/pager.rb:14:in `ceil': Infinity (FloatDomainError)
@hendryque

This comment has been minimized.

hendryque commented Apr 20, 2018

Closing that. Error was due to the outdated Jekyll-paginate plugin that somehow found its way in my installation. Removed it and replaced it with jekyll-paginatev2 and error is gone.

@hendryque hendryque closed this Apr 20, 2018

@pixelastic

This comment has been minimized.

Member

pixelastic commented Apr 25, 2018

Glad you found the solution :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment