slashdotdash / jekyll-lunr-js-search

[UNSUPPORTED] Jekyll + lunr.js = static websites with powerful full-text search using JavaScript
MIT License
548 stars 109 forks source link

Now the json 2.0.2 is out.... #112

Closed yefeiyu closed 7 years ago

yefeiyu commented 7 years ago

but jekyll-lunr-js-search need is 1.8.3, so when I ' gem install jekyll-lunr-js-search' is default. please update, thanks.

An error occurred while installing json (1.8.3), and Bundler cannot continue. Make sure that gem install json -v '1.8.3' succeeds before bundling.

yefeiyu commented 7 years ago

It is seems couldn't install json ~>1.8

Bundler could not find compatible versions
for gem "json":
  In snapshot (Gemfile.lock):
    json (= 2.0.2)

  In Gemfile:
jekyll-lunr-js-search was resolved to
3.2.0, which depends on
      json (~> 1.8)

uglifier (~> 2.5) was resolved to
2.7.2, which depends on
      json (>= 1.8.0)

Running `bundle update` will rebuild your
snapshot from scratch, using only
the gems in your Gemfile, which may resolve
the conflict.
slashdotdash commented 7 years ago

@yefeiyu What happened when you ran bundle update?

yefeiyu commented 7 years ago
xx@eizo:~/gh/jekyll-lunr-js-search$ bundle install
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "json":
  In snapshot (Gemfile.lock):
    json (= 2.0.2)

  In Gemfile:
    jekyll-lunr-js-search was resolved to 3.2.0, which depends on
      json (~> 1.8)

    uglifier (~> 2.5) was resolved to 2.7.2, which depends on
      json (>= 1.8.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
xx@eizo:~/gh/jekyll-lunr-js-search$ rm Gemfile.lock 
xx@eizo:~/gh/jekyll-lunr-js-search$ bundle update
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 10.5.0
Using execjs 2.7.0
Installing json 1.8.3 with native extensions
Using mini_portile2 2.1.0
Using libv8 3.16.14.17
Using ref 2.0.0
Using bundler 1.13.6
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/tmp/bundler20161223-1952-175e8ubjson-1.8.3/gems/json-1.8.3/ext/json/ext/generator
/usr/local/bin/ruby -r ./siteconf20161223-1952-1vo4ni0.rb extconf.rb
creating Makefile

current directory:
/tmp/bundler20161223-1952-175e8ubjson-1.8.3/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory:
/tmp/bundler20161223-1952-175e8ubjson-1.8.3/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
generator.c: In function ‘generate_json’:
generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this
function)
     } else if (klass == rb_cFixnum) {
                         ^~~~~~~~~~
generator.c:861:25: note: each undeclared identifier is reported only once for
each function it appears in
generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this
function)
     } else if (klass == rb_cBignum) {
                         ^~~~~~~~~~
generator.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
Makefile:241: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in
/tmp/bundler20161223-1952-175e8ubjson-1.8.3/gems/json-1.8.3 for inspection.
Results logged to
/tmp/bundler20161223-1952-175e8ubjson-1.8.3/extensions/x86_64-linux/2.4.0-static/json-1.8.3/gem_make.out

An error occurred while installing json (1.8.3), and Bundler cannot
continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.

xx@eizo:~/gh/jekyll-lunr-js-search$ gem install json -v '1.8.3'
ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/lib/ruby/gems/2.4.0 directory.
xx@eizo:~/gh/jekyll-lunr-js-search$ sudo gem install json -v '1.8.3'
Building native extensions.  This could take a while...
ERROR:  Error installing json:
    ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
/usr/local/bin/ruby -r ./siteconf20161223-2074-17say3c.rb extconf.rb
creating Makefile

current directory: /usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory: /usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
generator.c: In function ‘generate_json’:
generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function)
     } else if (klass == rb_cFixnum) {
                         ^~~~~~~~~~
generator.c:861:25: note: each undeclared identifier is reported only once for each function it appears in
generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this function)
     } else if (klass == rb_cBignum) {
                         ^~~~~~~~~~
generator.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
Makefile:241: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.4.0/gems/json-1.8.3 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-linux/2.4.0-static/json-1.8.3/gem_make.out
xx@eizo:~/gh/yefeiyu.github.io$ gem list json

*** LOCAL GEMS ***

json (default: 2.0.2)
xx@eizo:~/gh/yefeiyu.github.io$ gem uninstall json
ERROR:  While executing gem ... (Gem::InstallError)
    gem "json" cannot be uninstalled because it is a default gem
yefeiyu commented 7 years ago

and then, I changed the jekyll-lunr-js-search.gemspec, -----> s.add_runtime_dependency 'json', '~> 2' So, the # bundle update and # bower update is good, but #rake install is wrong. It's told me that cannot load -- v8 and --uglifier.

xx@eizo:~/gh/jekyll-lunr-js-search$ bundle update
Fetching gem metadata from https://rubygems.org/.............
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 10.5.0
Using execjs 2.7.0
Using json 2.0.2
Using mini_portile2 2.1.0
Using libv8 3.16.14.17
Using ref 2.0.0
Using bundler 1.13.6
Using uglifier 2.7.2
Using nokogiri 1.6.8.1
Using therubyracer 0.12.2
Using jekyll-lunr-js-search 3.2.0 from source at `.`
Bundle updated!
xx@eizo:~/gh/jekyll-lunr-js-search$ bower list
bower check-new     Checking for new versions of the project dependencies...
jekyll-lunr-js-search#0.0.1 /home/xx/gh/jekyll-lunr-js-search
├── date.format#1.2.3
├── jquery#2.1.4 (latest is 3.1.1)
├── lunr.js#0.4.5 (latest is 0.7.2)
├── mustache#0.8.2 (latest is 2.3.0)
├─┬ uri.js#1.12.1 (latest is 1.18.4)
│ └── jquery#2.1.4 (3.1.1 available)
└── v8#5.7.340 extraneous
xx@eizo:~/gh/jekyll-lunr-js-search$ rake i --trace
/usr/local/lib/ruby/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:21: warning: constant ::Fixnum is deprecated
rake aborted!
TypeError: wrong argument type Class (expected Module)
/usr/local/lib/ruby/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:23:in `include'
/usr/local/lib/ruby/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:23:in `block (2 levels) in <top (required)>'
/usr/local/lib/ruby/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:22:in `class_eval'
/usr/local/lib/ruby/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:22:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:21:in `each'
/usr/local/lib/ruby/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8/conversion.rb:21:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:68:in `require'
/usr/local/lib/ruby/gems/2.4.0/gems/therubyracer-0.12.2/lib/v8.rb:22:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in `available?'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `each'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `find'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `best_available'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:57:in `autodetect'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/ruby/gems/2.4.0/gems/uglifier-3.0.4/lib/uglifier.rb:5:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
/home/xx/gh/jekyll-lunr-js-search/Rakefile:2:in `<top (required)>'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:22:in `load'
/usr/local/bin/rake:22:in `<main>'
LoadError: cannot load such file -- v8
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/ruby_racer_runtime.rb:108:in `available?'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `each'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `find'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:63:in `best_available'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs/runtimes.rb:57:in `autodetect'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs.rb:5:in `<module:ExecJS>'
/usr/local/lib/ruby/gems/2.4.0/gems/execjs-2.7.0/lib/execjs.rb:4:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/ruby/gems/2.4.0/gems/uglifier-3.0.4/lib/uglifier.rb:5:in `<top (required)>'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:40:in `require'
/home/xx/gh/jekyll-lunr-js-search/Rakefile:2:in `<top (required)>'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:22:in `load'
/usr/local/bin/rake:22:in `<main>'
LoadError: cannot load such file -- uglifier
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/home/xx/gh/jekyll-lunr-js-search/Rakefile:2:in `<top (required)>'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb:28:in `load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:687:in `raw_load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:96:in `block in load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:95:in `load_rakefile'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:79:in `block in run'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/lib/rake/application.rb:77:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/rake:22:in `load'
/usr/local/bin/rake:22:in `<main>'
slashdotdash commented 7 years ago

What a mess, sorry not sure what I can do to help here. I'm having trouble installing the latest version of nokogiri myself. I haven't touched Ruby or gems for a while now. It's painful going back.

yefeiyu commented 7 years ago

Thanks a lot for your pay attention, I can use the older backup, nevermind.

slashdotdash commented 7 years ago

@yefeiyu I've just upgraded all of the Ruby gem and JavaScript dependencies, including an upgrade to json v2.

Published jekyll-lunr-js-search v3.3.0 to Ruby gems. Hopefully that will help resolve your problem.

yefeiyu commented 7 years ago

It's working! Very Good, Thank you.

slashdotdash commented 7 years ago

Great, glad to hear it's now working.