I want to enable pagination on my Jekyll site, but this happens:
jekyll serve
WARN: Unresolved specs during Gem::Specification.reset:
eventmachine (>= 0.12.9)
listen (~> 3.0)
rouge (< 4, >= 1.7)
rb-fsevent (>= 0.9.4, ~> 0.9)
rb-inotify (>= 0.9.7, ~> 0.9)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Configuration file: /Users/sean/dev/sh78.github.io/_config.yml
Source: /Users/sean/dev/sh78.github.io
Destination: /Users/sean/dev/sh78.github.io/_site
Incremental build: disabled. Enable with --incremental
Generating...
Liquid Exception: Liquid syntax error (line 1): Unknown tag 'paginator' in log/index.html
jekyll 3.8.3 | Error: Liquid syntax error (line 1): Unknown tag 'paginator'
I think I followed the docs to a tee:
In _config.yml:
plugins:
- jekyll-feed
- jekyll-seo-tag
- jekyll-paginate
paginate: 2
paginate_path: "/log/page:num/"
The index.html file is in place as defined in paginate_path
ls
404.html README.md _posts/ favicon.ico
Gemfile _config.yml _sass/ favicon.png
Gemfile.lock _includes/ _site/ index.md
LICENSE.txt _layouts/ assets/ log/
ls log/
index.html
Contents of log/index.html, where I'm trying to at least print the paginator.posts object. There is no permalink in the front matter per the docs:
---
layout: log
title: log
icon: pencil-alt
description: >
Sean's blog. Articles about software and other things.
---
{% paginator.posts %}
Here is the parent log (blog) template:
---
layout: default
---
<div class="blog">
{{ content }}
{%- if site.posts.size > 0 -%}
{% comment %} *truncated* (it works fine) {% endcomment %}
I have jekyll-paginate in my Gemfile:
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-paginate"
end
And ran bundle install successfully:
bundle install
Using public_suffix 3.0.2
Using addressable 2.5.2
Using bundler 1.16.2
Using colorator 1.1.0
Using concurrent-ruby 1.0.5
Using eventmachine 1.2.7
Using http_parser.rb 0.6.0
Using em-websocket 0.5.1
Using ffi 1.9.25
Using forwardable-extended 2.6.0
Using i18n 0.9.5
Using rb-fsevent 0.10.3
Using rb-inotify 0.9.10
Using sass-listen 4.0.0
Using sass 3.5.6
Using jekyll-sass-converter 1.5.2
Using ruby_dep 1.5.0
Using listen 3.1.5
Using jekyll-watch 2.0.0
Using kramdown 1.17.0
Using liquid 4.0.0
Using mercenary 0.3.6
Using pathutil 0.16.1
Using rouge 3.1.1
Using safe_yaml 1.0.4
Using jekyll 3.8.3
Using jekyll-feed 0.9.3
Using jekyll-paginate 1.1.0
Using jekyll-seo-tag 2.5.0
Using minimaterialize 1.1.2
Bundle complete! 5 Gemfile dependencies, 30 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
I uninstalled all versions of jekyll except the one in use, like this answer.
I also tried like gem cleanup && bundle exec jekyll serve like in this answer, and got the same exception listed above.
Environment:
jekyll -v
WARN: Unresolved specs during Gem::Specification.reset:
eventmachine (>= 0.12.9)
listen (~> 3.0)
rouge (< 4, >= 1.7)
rb-fsevent (>= 0.9.4, ~> 0.9)
rb-inotify (>= 0.9.7, ~> 0.9)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
jekyll 3.8.3
ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
gem -v
2.5.1
What am I missing?
Well, yeah, I made an oops. I wrote paginator as a liquid tag, aka command (like if) instead of just calling a variable/object.
Changing {% paginator %} to {{ paginator }} is the solution.
Related
Context
Deployments to Cloud Functions have been failing since a few days ago.
Gemfile
source "https://rubygems.org"
ruby "~> 2.7.0"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "google-cloud-firestore"
Deployment script
$ gcloud functions deploy my_func --region=us-central1 --memory=128MB --runtime=ruby27
(snip)
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby (~> 2.7.0)
google-cloud-firestore was resolved to 2.4.1, which depends on
google-cloud-firestore-v1 (~> 0.0) was resolved to 0.4.0, which depends on
gapic-common (~> 0.3) was resolved to 0.4.0, which depends on
google-protobuf (~> 3.15, >= 3.15.2) was resolved to 3.15.5, which
depends on
Ruby (< 3.1.dev, >= 2.3)
google-cloud-firestore was resolved to 2.4.1, which depends on
google-cloud-firestore-v1 (~> 0.0) was resolved to 0.4.0, which depends on
gapic-common (~> 0.3) was resolved to 0.4.0, which depends on
grpc (~> 1.36) was resolved to 1.36.0, which depends on
Ruby (< 3.1.dev, >= 2.4); Error ID: af32a539
Why?
This is bundler's regression since bundler v2.2.8.
https://github.com/rubygems/rubygems/issues/4366
And this is fixed at bundler v2.2.10
https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md#2210-february-15-2021
https://github.com/rubygems/rubygems/pull/4371
So I want the bundler version to be less than v2.2.8 or more than v2.2.10.
Cloud Functions deployment ( gcloud functions deploy ) automatically runs bundle install and uses bundler which installed in deployment task.
Current bundler version in deployment task is v2.2.9
Verification code
Gemfile
source "https://rubygems.org"
ruby "~> 2.7.0"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "bundler", "!= 2.2.8", "!= 2.2.9"
Deployment script
$ gcloud functions deploy my_func --region=us-central1 --memory=128MB --runtime=ruby27
(snip)
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (!= 2.2.8, != 2.2.9)
Current Bundler version:
bundler (2.2.9)
Main subject
gcloud functions deploy doesn't have some arguments to change bundler version...
https://cloud.google.com/sdk/gcloud/reference/functions/deploy?hl=ja
How to change the version of bundler used in Cloud Functions deployment?
I ran into a similar issue as well, however the error output was slightly different. One thing in common was the line:
Bundler found conflicting requirements for the Ruby version:
After doing some digging and troubleshooting, I found that Google Cloud Functions locks the bundled platform on our behalf. I'm not a ruby expert, but I suspect this will impact how information from the Gemfile will be read along with the Ruby version.
Example Log from Google Cloud Functions:
2021-03-10 13:13:01.764 PST
Step #4 - "builder": Done "bundle lock --add-platform x86_64-linux"
Solution:
Update bundler locally (I updated to 2.2.14). Delete your Gemfile.lock file and rerun bundle install to generate Gemfile.lock. This should fix dependencies if there is anything to fix.
Most importantly, it will update the Platforms section in your Gemfile.lock to match what Google expects.
In my case, the platform was updated from Ruby to x86_64-darwin-19.
Or the other approach may be to just update the platform with bundle if possible.
Eventually I have successfully deployed with followings.
gem install bundler --no-doc
Delete Gemfile.lock
re-create Gemfile.lock ( bundle install )
diff
$ git --no-pager diff main
diff --git a/Gemfile.lock b/Gemfile.lock
index 5e7502b..b5642ab 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
## -57,7 +57,6 ## GEM
gapic-common (~> 0.3)
google-cloud-errors (~> 1.0)
grpc-google-iam-v1 (>= 0.6.10, < 2.0)
- google-protobuf (3.15.5)
google-protobuf (3.15.5-universal-darwin)
googleapis-common-protos (1.3.11)
google-protobuf (~> 3.14)
## -72,9 +71,6 ## GEM
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.14)
- grpc (1.36.0)
- google-protobuf (~> 3.14)
- googleapis-common-protos-types (~> 1.0)
grpc (1.36.0-universal-darwin)
google-protobuf (~> 3.14)
googleapis-common-protos-types (~> 1.0)
## -160,7 +156,6 ## GEM
PLATFORMS
ruby
- x86_64-darwin-17
DEPENDENCIES
dotenv
## -180,4 +175,4 ## RUBY VERSION
ruby 2.7.2p137
BUNDLED WITH
- 2.1.4
+ 2.2.14
when I execute this command to compile my project:
sudo bundle exec fastlane beta
shows this error:
Could not find rake-12.3.3 in any of the sources
Run `bundle install` to install missing gems.
(base)
and I install rake:
$ sudo gem install rake
Password:
Successfully installed rake-13.0.3
Parsing documentation for rake-13.0.3
Done installing documentation for rake after 0 seconds
1 gem installed
(base)
but still not fix the problem. what should I do to make it work? I already execute bundle install, still not fix it:
~/Documents/GitHub/cruise-open/ios on main! ⌚ 17:49:28
$ sudo bundle install
Password:
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Using rake 12.3.3
Using CFPropertyList 3.0.3
Using public_suffix 4.0.6
Using addressable 2.7.0
Using atomos 0.1.3
Using aws-eventstream 1.1.0
Using aws-partitions 1.402.0
Using aws-sigv4 1.2.2
Using jmespath 1.4.0
Using aws-sdk-core 3.110.0
Using aws-sdk-kms 1.39.0
Using aws-sdk-s3 1.86.0
Using babosa 1.0.4
Using bundler 2.2.9
Using claide 1.0.3
Using colored 1.2
Using colored2 3.1.2
Using highline 1.7.10
Using commander-fastlane 4.4.6
Using declarative 0.0.20
Using declarative-option 0.1.0
Using digest-crc 0.6.2
Using unf_ext 0.0.7.7
Using unf 0.1.4
Using domain_name 0.5.20190701
Using dotenv 2.7.6
Using emoji_regex 3.2.1
Using excon 0.78.1
Using multipart-post 2.0.0
Using ruby2_keywords 0.0.2
Using faraday 1.1.0
Using http-cookie 1.0.3
Using faraday-cookie_jar 0.0.7
Using faraday_middleware 1.0.0
Using fastimage 2.2.0
Using gh_inspector 1.1.3
Using jwt 2.2.2
Using memoist 0.16.2
Using multi_json 1.15.0
Using os 1.1.1
Using signet 0.14.0
Using googleauth 0.14.0
Using httpclient 2.8.3
Using mini_mime 1.0.2
Using uber 0.1.0
Using representable 3.0.4
Using retriable 3.1.2
Using google-api-client 0.38.0
Using google-cloud-env 1.4.0
Using google-cloud-errors 1.0.1
Using google-cloud-core 1.5.0
Using google-cloud-storage 1.29.1
Using json 2.3.1
Using mini_magick 4.11.0
Using plist 3.5.0
Using rubyzip 2.3.0
Using security 0.1.3
Using naturally 2.2.0
Using simctl 1.6.8
Using slack-notifier 2.3.2
Using terminal-notifier 2.0.0
Using unicode-display_width 1.7.0
Using terminal-table 1.8.0
Using tty-screen 0.8.1
Using tty-cursor 0.7.1
Using tty-spinner 0.9.3
Using word_wrap 1.0.0
Using nanaimo 0.3.0
Using xcodeproj 1.19.0
Using rouge 2.0.7
Using xcpretty 0.3.0
Using xcpretty-travis-formatter 1.0.0
Using fastlane 2.170.0
Using fastlane-plugin-pgyer 0.2.2
Using xcode-install 2.6.8
Bundle complete! 3 Gemfile dependencies, 75 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
(base)
this is my Gemfile:
source "https://rubygems.org"
gem "xcode-install"
gem "fastlane"
plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
I have an error message when trying to update Nokogiri gem :
The dependency wdm (~> 0.1.0) will be unused by any of the platforms
Bundler is installing for. Bundler is installing for ruby but the
dependency is only for x86-mswin32, x86-mingw32. To add those
platforms to the bundle, run bundle lock --add-platform x86-mswin32
x86-mingw32. The dependency tzinfo-data (>= 0) will be unused by any
of the platforms Bundler is installing for. Bundler is installing for
ruby but the dependency is only for x86-mswin32, x86-mingw32, java. To
add those platforms to the bundle, run bundle lock --add-platform
x86-mswin32 x86-mingw32 java. Fetching gem metadata from
http://rubygems.org/.............. Fetching gem metadata from
http://rubygems.org/.. Resolving dependencies... Using i18n 0.7.0
Using json 1.8.3 Using minitest 5.7.0 Using thread_safe 0.3.5 Using
tzinfo 1.2.2 Using activesupport 4.1.11 Using addressable 2.3.8 Using
execjs 2.5.2 Using autoprefixer-rails 5.2.1 Using sass 3.4.15 Using
bootstrap-sass 3.3.5 Using bundler 1.16.0 Using hitimes 1.2.2 Using
timers 4.0.1 Using celluloid 0.16.0 Using chunky_png 1.3.4 Using
coffee-script-source 1.9.1.1 Using coffee-script 2.4.1 Using
multi_json 1.11.1 Using compass-core 1.0.3 Using compass-import-once
1.0.5 Using rb-fsevent 0.9.5 Using ffi 1.9.8 Using rb-inotify 0.9.5 Using compass 1.0.3 Using eventmachine 1.0.7 Using http_parser.rb
0.6.0 Using em-websocket 0.5.1 Using erubis 2.7.0 Using font-awesome-sass 4.2.2 Using tilt 1.4.1 Using haml 4.0.6 Using hike
1.2.3 Using uber 0.0.13 Using hooks 0.4.0 Using htmlcompressor 0.2.0 Using thor 0.19.1 Using jquery-middleman 3.1.2 Using kramdown 1.7.0
Using listen 2.10.1 Using padrino-support 0.12.5 Using padrino-helpers
0.12.5 Using rack 1.6.4 Using rack-test 0.6.3 Using middleman-core 3.3.12 Using sprockets 2.12.3 Using sprockets-helpers 1.1.0 Using sprockets-sass 1.3.1 Using middleman-sprockets 3.4.2 Using uglifier
2.7.1 Using middleman 3.3.12 Using middleman-blog 3.5.3 Using net-ssh 2.9.2 Using net-sftp 2.1.2 Using ptools 1.3.2 Using middleman-deploy 1.0.0 Using middleman-disqus 1.1.0 Using rack-livereload 0.3.15 Using middleman-livereload 3.1.1 Using middleman-minify-html 3.4.1 Using
middleman-protect-emails 0.3.1 Using mini_portile2 2.3.0 Fetching
nokogiri 1.8.2 (was 1.6.6.4) Installing nokogiri 1.8.2 (was 1.6.6.4)
with native extensions Gem::Ext::BuildError: ERROR: Failed to build
gem native extension.
current directory: /usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/nokogiri-1.8.2/ext/nokogiri
/usr/local/var/rbenv/versions/2.2.2/bin/ruby -r
./siteconf20180130-47766-zngdwi.rb extconf.rb checking if the C
compiler accepts ... * extconf.rb failed * Could not create
Makefile due to some reason, probably lack of necessary libraries
and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options: --with-opt-dir --without-opt-dir
--with-opt-include --without-opt-include=${opt-dir}/include
--with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog
--without-make-prog --srcdir=. --curdir
--ruby=/usr/local/var/rbenv/versions/2.2.2/bin/$(RUBY_BASE_NAME)
--help --clean
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:456:in
try_do': The compiler failed to generate an executable file.
(RuntimeError) You have to install development tools first. from
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:571:in
block in try_compile' from
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:522:in
with_werror' from
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:571:in
try_compile' from extconf.rb:138:in nokogiri_try_compile' from
extconf.rb:162:inblock in add_cflags' from
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/2.2.0/mkmf.rb:619:in
with_cflags' from extconf.rb:161:inadd_cflags' from
extconf.rb:410:in `'
To see why this extension failed to compile, please check the mkmf.log
which can be found here:
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-13/2.2.0-static/nokogiri-1.8.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/nokogiri-1.8.2
for inspection. Results logged to
/usr/local/var/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-13/2.2.0-static/nokogiri-1.8.2/gem_make.out
An error occurred while installing nokogiri (1.8.2), and Bundler
cannot continue. Make sure that gem install nokogiri -v '1.8.2'
succeeds before bundling.
In Gemfile: nokogiri
This helped me on Ubuntu runnung on WSL:
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev
From official Nokogiri installation instructions
For Mac OS, it suggests:
First, make sure you have the latest version of RubyGems and xcode commandline tools:
Run:
gem update --system
xcode-select --install
Then install nokogiri:
gem install nokogiri
There are more troubleshooting tips on that page.
I am following the instructions here: https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/ to set up Jekyll with Guthub on Ubuntu 14.04 and I'm running into a problem when I try to run "bundle install". Here's the output I get:
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Rubygems 1.8.23 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
Your user account isn't allowed to install to the system Rubygems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to Rubygems using sudo.
Password:
Installing RedCloth 4.2.9 with native extensions
Using i18n 0.7.0
Using json 1.8.3
Installing minitest 5.8.3
Using thread_safe 0.3.5
Using addressable 2.4.0
Installing blankslate 2.1.2.4
Installing fast-stemmer 1.0.2 with native extensions
Using coffee-script-source 1.10.0
Using execjs 2.7.0
Using colorator 0.1
Using ffi 1.9.10
Using multipart-post 2.0.0
Using gemoji 2.1.0
Using net-dns 0.8.0
Installing public_suffix 1.5.3
Gem::InstallError: public_suffix requires Ruby version >= 2.0.
Using jekyll-paginate 1.1.0
Using sass 3.4.22
Using rb-fsevent 0.9.7
Installing kramdown 1.5.0
Installing liquid 2.6.1
Using mercenary 0.3.6
Installing posix-spawn 0.3.11 with native extensions
Installing yajl-ruby 1.2.1 with native extensions
Installing redcarpet 3.1.2 with native extensions
Using safe_yaml 1.0.4
Using mini_portile2 2.1.0
Using pkg-config 1.1.7
Installing jekyll-sitemap 0.6.3
Installing maruku 0.7.0
Installing rdiscount 2.1.7 with native extensions
Using terminal-table 1.6.0
Using bundler 1.12.5
Using tzinfo 1.2.2
Installing parslet 1.5.0
Installing classifier-reborn 2.0.4
Using coffee-script 2.4.1
Using ethon 0.9.0
Using rb-inotify 0.9.7
Using faraday 0.9.2
An error occurred while installing public_suffix (1.5.3), and Bundler cannot continue.
Make sure that `gem install public_suffix -v '1.5.3'` succeeds before bundling.
When I run "sudo gem install public_suffix -v '1.5.3'" I get:
Successfully installed public_suffix-1.5.3
Parsing documentation for public_suffix-1.5.3
Done installing documentation for public_suffix after 0 seconds
1 gem installed
When I run "ruby --version" I get:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
Any idea what to try next?
I am looking for an answer to this github issue: https://github.com/guard/listen/issues/399
I am using Windows 7 and trying to run bundle install. I am getting the following error:
mysys:# bundle install
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies..................................................................................................
.............................................................................................................
Using rake 11.1.2
Using addressable 2.3.8
Using multipart-post 2.0.0
Using httpclient 2.6.0.1
Using buff-extensions 1.0.0
Using hashie 2.1.2
Using buff-ruby_engine 0.1.0
Using hitimes 1.2.4
Using nio4r 1.2.1
Using cleanroom 1.0.0
Using minitar 0.5.4
Using retryable 2.0.3
Using buff-ignore 1.1.1
Using erubis 2.7.0
Using json 1.8.3
Using mixlib-log 1.6.0
Using rspec-support 3.4.1
Using diff-lcs 1.2.5
Using semverse 1.2.1
Using molinillo 0.4.5
Using thor 0.19.1
Using ffi 1.9.10
Using libyajl2 1.2.0
Using rack 1.6.4
Using highline 1.7.8
Using mime-types 1.25.1
Using mixlib-cli 1.6.0
Using mixlib-config 2.2.1
Using win32-api 1.5.1
Using net-ssh 2.9.4
Using ipaddress 0.8.3
Using systemu 2.6.5
Using wmi-lite 1.0.0
Using plist 3.1.0
Using coderay 1.1.1
Using method_source 0.8.2
Using slop 3.6.0
Using multi_json 1.12.1
Using nokogiri 1.5.11
Using polyglot 0.3.5
Using yajl-ruby 1.1.0
Using formatador 0.2.5
Using rb-fsevent 0.9.7
Using ruby_dep 1.3.1
Using lumberjack 1.0.10
Using nenv 0.3.0
Using shellany 0.0.1
Using guard-compat 1.2.1
Using safe_yaml 1.0.4
Using ruby-wmi 0.4.0
Using ruby_gntp 0.3.4
Using wdm 0.1.1
Using bundler 1.12.4
Using faraday 0.9.2
Using varia_model 0.4.1
Using buff-shell_out 0.2.0
Using timers 4.0.4
Using rspec-core 3.4.4
Using rspec-expectations 3.4.0
Using rspec-mocks 3.4.1
Using solve 2.0.3
Using win32-process 0.7.3
Using win32-dir 0.4.5
Using win32-ipc 0.6.6
Using win32-mmap 0.4.0
Using win32-service 0.8.2
Using rb-inotify 0.9.7
Using rb-fchange 0.0.6
Installing ffi-yajl 1.4.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
C:/opscode/chefdk/embedded/bin/ruby.exe -r ./siteconf20160604-8548-n39nif.rb extconf.rb
-IC:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/include -IC:/opscode/chefdk/embedded/include -O3 -march=i686 -DFD_SETSIZE=2048
-LC:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/lib -L. -LC:/opscode/chefdk/embedded/lib
creating Makefile
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
make "DESTDIR=" clean
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
make "DESTDIR="
generating encoder-i386-mingw32.def
compiling encoder.c
linking shared-object ffi_yajl/ext/encoder.so
c:/opscode/chefdk/embedded/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lyajldll
collect2.exe: error: ld returned 1 exit status
make: *** [encoder.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0 for inspection.
Results logged to C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/ffi-yajl-1.4.0/gem_make.out
Using rest-client 1.6.7
Using windows-api 0.4.2
Using net-ssh-gateway 1.2.0
Using fauxhai 3.5.0
Using net-scp 1.2.1
Using pry 0.10.3
Using gherkin 2.11.8
Using treetop 1.4.15
Using notiffany 0.1.0
Using berkshelf-api-client 2.0.0
Using sawyer 0.7.0
Using buff-config 1.0.1
Using celluloid 0.16.0
Using mixlib-authentication 1.4.0
Using rspec 3.4.0
Using win32-event 0.6.1
Using win32-mutex 0.4.1
Installing listen 3.1.5
Gem::InstallError: listen requires Ruby version >= 2.2.3, ~> 2.2.
An error occurred while installing ffi-yajl (1.4.0), and Bundler cannot
continue.
Make sure that gem install ffi-yajl -v '1.4.0' succeeds before bundling.
PS C:\Users\502620480\githubci\og_app_bp-poa-ui> gem install ffi-yajl -v '1.4.0'
Fetching: ffi-1.9.10-x64-mingw32.gem (100%)
Successfully installed ffi-1.9.10-x64-mingw32
Fetching: libyajl2-1.2.0.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed libyajl2-1.2.0
Fetching: ffi-yajl-1.4.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed ffi-yajl-1.4.0
Parsing documentation for ffi-1.9.10-x64-mingw32
Installing ri documentation for ffi-1.9.10-x64-mingw32
Parsing documentation for libyajl2-1.2.0
unable to convert "\xD0" from ASCII-8BIT to UTF-8 for ext/libyajl2/vendor/yajl/test/parsing/cases/invalid_utf8.json, ski
pping
unable to convert "\x92" from ASCII-8BIT to UTF-8 for ext/libyajl2/vendor/yajl/test/parsing/cases/non_utf8_char_in_strin
g.json, skipping
Installing ri documentation for libyajl2-1.2.0
Parsing documentation for ffi-yajl-1.4.0
Installing ri documentation for ffi-yajl-1.4.0
Done installing documentation for ffi, libyajl2, ffi-yajl after 4 seconds
3 gems installed
PS C:\Users\502620480\githubci\og_app_bp-poa-ui> bundle install
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies..................................................................................................
.............................................................................................................
Using rake 11.1.2
Using addressable 2.3.8
Using multipart-post 2.0.0
Using httpclient 2.6.0.1
Using buff-extensions 1.0.0
Using hashie 2.1.2
Using buff-ruby_engine 0.1.0
Using hitimes 1.2.4
Using nio4r 1.2.1
Using cleanroom 1.0.0
Using minitar 0.5.4
Using retryable 2.0.3
Using buff-ignore 1.1.1
Using erubis 2.7.0
Using json 1.8.3
Using mixlib-log 1.6.0
Using rspec-support 3.4.1
Using diff-lcs 1.2.5
Using semverse 1.2.1
Using molinillo 0.4.5
Using thor 0.19.1
Using ffi 1.9.10
Using libyajl2 1.2.0
Using rack 1.6.4
Using highline 1.7.8
Using mime-types 1.25.1
Using mixlib-cli 1.6.0
Using mixlib-config 2.2.1
Using win32-api 1.5.1
Using net-ssh 2.9.4
Using ipaddress 0.8.3
Using systemu 2.6.5
Using wmi-lite 1.0.0
Using plist 3.1.0
Using coderay 1.1.1
Using method_source 0.8.2
Using slop 3.6.0
Using multi_json 1.12.1
Using nokogiri 1.5.11
Using polyglot 0.3.5
Using yajl-ruby 1.1.0
Using formatador 0.2.5
Using rb-fsevent 0.9.7
Using ruby_dep 1.3.1
Using lumberjack 1.0.10
Using nenv 0.3.0
Using shellany 0.0.1
Using guard-compat 1.2.1
Using safe_yaml 1.0.4
Using ruby-wmi 0.4.0
Using ruby_gntp 0.3.4
Using wdm 0.1.1
Using bundler 1.12.4
Using faraday 0.9.2
Using varia_model 0.4.1
Using buff-shell_out 0.2.0
Using timers 4.0.4
Using rspec-core 3.4.4
Using rspec-expectations 3.4.0
Using rspec-mocks 3.4.1
Using solve 2.0.3
Using win32-process 0.7.3
Using win32-dir 0.4.5
Using win32-ipc 0.6.6
Using win32-mmap 0.4.0
Using win32-service 0.8.2
Using rb-inotify 0.9.7
Using rb-fchange 0.0.6
Installing ffi-yajl 1.4.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
C:/opscode/chefdk/embedded/bin/ruby.exe -r ./siteconf20160604-3256-1dpveon.rb extconf.rb
-IC:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/include -IC:/opscode/chefdk/embedded/include -O3 -march=i686 -DFD_SETSIZE=2048
-LC:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/libyajl2-1.2.0/lib/libyajl2/vendored-libyajl2/lib -L. -LC:/opscode/chefdk/embedded/lib
creating Makefile
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
make "DESTDIR=" clean
current directory: C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0/ext/ffi_yajl/ext/encoder
make "DESTDIR="
generating encoder-i386-mingw32.def
compiling encoder.c
linking shared-object ffi_yajl/ext/encoder.so
c:/opscode/chefdk/embedded/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lyajldll
collect2.exe: error: ld returned 1 exit status
make: *** [encoder.so] Error 1
make failed, exit code 2
Gem files will remain installed in C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/gems/ffi-yajl-1.4.0 for inspection.
Results logged to C:/opscode/chefdk/embedded/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/ffi-yajl-1.4.0/gem_make.out
Using rest-client 1.6.7
Using windows-api 0.4.2
Using net-ssh-gateway 1.2.0
Using fauxhai 3.5.0
Using net-scp 1.2.1
Using pry 0.10.3
Using gherkin 2.11.8
Using treetop 1.4.15
Using notiffany 0.1.0
Using berkshelf-api-client 2.0.0
Using sawyer 0.7.0
Using buff-config 1.0.1
Using celluloid 0.16.0
Using mixlib-authentication 1.4.0
Using rspec 3.4.0
Using win32-event 0.6.1
Using win32-mutex 0.4.1
Installing listen 3.1.5
Gem::InstallError: listen requires Ruby version >= 2.2.3, ~> 2.2.
An error occurred while installing ffi-yajl (1.4.0), and Bundler cannot
continue.
Make sure that gem install ffi-yajl -v '1.4.0' succeeds before bundling.
I have successfully installed ffi-yajl, but I still get the same error when running bundle install.
I am using following version of binaries.
$ ruby --version
ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32]
$ which ruby
/c/Ruby22-x64/bin/ruby
$ which gem
/c/Ruby22-x64/bin/gem
$ which bundler
/c/opscode/chefdk/embedded/bin/bundler
DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
Please suggest what is the issue here? We have been trying from last 2 weeks without any success.
I had the same issue on ruby 2.4. Switching on ruby 2.3 worked for me
If you can't upgrade, you can lock Listen to version 3.0.x, e.g. in your Gemfile:
gem 'listen', '~> 3.0.8'
That's because 3.0.x versions can be installed on older versions of Ruby, but for safety, versions 3.1 and higher are not officially tested with outdated Ruby versions.
That should fix the gem install issue, so I'm closing this.
https://github.com/guard/listen/issues/399#issuecomment-223800740