Why is my jekyll command not working anymore? - ruby

I've recently discovered that the jekyll command doesn't work anymore on my computer, after perfectly using it for several months.
Whenever I try to run a jekyll command, it says:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs':
Could not find 'jekyll' (>= 0) among 34 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/Mael/.gem/ruby/2.3.0:/Library/Ruby/Gems/2.3.0:/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0',
execute `gem env` for more information
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
from /usr/local/bin/jekyll:22:in `<main>'
I'm on macOS Sierra (10.12.6).
Xcode is installed
I have Xcode installed on my computer:
$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Reinstalling Jekyll
Checking ruby version and (re)installing bundler
So I tried reinstalling Jekyll as I did the first time:
$ ruby -v
ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin16]
$ sudo gem install bundler
Successfully installed bundler-1.17.1
Parsing documentation for bundler-1.17.1
Done installing documentation for bundler after 4 seconds
1 gem installed
Creating a Gemfile
I created a Gemfile which contains:
gem 'github-pages'
source 'https://rubygems.org'
Bundle install (here come the issues)
And ran, in the directory that contains the Gemfile:
$ bundle install
Here, the installation doesn't work, it says:
An error occurred while installing commonmarker (0.17.13), and Bundler cannot continue.
Make sure that `gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
github-pages was resolved to 192, which depends on
jekyll-commonmark-ghpages was resolved to 0.1.5, which depends on
jekyll-commonmark was resolved to 1.2.0, which depends on
commonmarker
So I tried the gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/' command, and it says:
Building native extensions. This could take a while...
ERROR: Error installing commonmarker:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13/ext/commonmarker
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20181112-6105-u9aca2.rb extconf.rb
creating Makefile
current directory: /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR=" clean
current directory: /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR="
make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin16/ruby/config.h', needed by `arena.o'. Stop.
make failed, exit code 2
Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/commonmarker-0.17.13 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-16/2.3.0/commonmarker-0.17.13/gem_make.out
I noticed that I have several jekyll and github-pages gems in my /Library/Ruby/Gems/2.0.0/gems (2.0.0) directory:
github-pages-146
github-pages-health-check-1.3.5
...
jekyll-3.4.5
jekyll-avatar-0.4.2
jekyll-coffeescript-1.0.1
[and several other jekyll directories]
...
But not in my /Library/Ruby/Gems/2.3.0/gems (2.3.0) directory! (the one which seems to be targeted by the GEM_PATH when running a jekyll command)
So, maybe I did something that changed the version or something. (I've recently installed osxfuse and sshfs (via brew), I don't know if it has anything to do with the issue?)
I don't know anything about Ruby, Gems system, and so on. Maybe the solution is obvious but I've tried several things with no success.
(Sorry it's a bit long but I wanted to be as clear as possible!)

I also don't work with Ruby, but I had a similar problem on Mac OS 10.12.6 and here is how I solved it.
This is likely caused by some disagreement between the system Ruby environment and Jekyll, and the easiest way to fix it is to create a new environment altogether.
First you should use rvm to manage your ruby versions to avoid delete the system Ruby and break your OS. After you set up rvm, run
rvm install 2.3.3
to install Ruby 2.3.3 (which is what I used). After it finished, make this the default Ruby version in your system:
rvm --default use 2.3.3
then I did the following:
gem install bundler
gem install jekyll
bundle install
and Jekyll worked for me again.
Hope that helps.

I'm not a mac user and not real familiar with ruby, but when I see ERROR: Failed to build gem native extension it usually has to do with not having the ruby version that includes the devkit.
As I understand it, you can get ruby with the devkit or ruby without the devkit, if there is no devkit it can't build some of the gems it needs. On a PC the devkit is required in order to install all of the jekyll dependencies.

I have the same problem with jeklly to bundle new website.
try this:
xcode-select --install
gem install bundler jekyll
That's the way I don't need to sudo to install bundler jekyll.
Install the Command Line Tools:
xcode-select --install
abcLabdeMacBook-Air:zeppelin-master abclab$ xcode-select --install
xcode-select: note: install requested for command line developer tools
abcLabdeMacBook-Air:zeppelin-master abclab$ gem install bundler jekyll
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
abcLabdeMacBook-Air:zeppelin-master abclab$ bundle install
Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring ffi-1.9.25 because its extensions are not built. Try: gem pristine ffi --version 1.9.25
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Fetching gem metadata from http://rubygems.org/.................
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies.....
Using concurrent-ruby 1.1.4
Following files may not be writable, so sudo is needed:
/Library/Ruby/Gems/2.3.0
/Library/Ruby/Gems/2.3.0/build_info
/Library/Ruby/Gems/2.3.0/cache
/Library/Ruby/Gems/2.3.0/doc
/Library/Ruby/Gems/2.3.0/extensions
/Library/Ruby/Gems/2.3.0/gems
/Library/Ruby/Gems/2.3.0/specifications
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.10
Using public_suffix 2.0.5
Using addressable 2.5.2
Using execjs 2.7.0
Using autoprefixer-rails 9.4.7
Using bundler 2.0.1
Using chunky_png 1.3.11
Using coffee-script-source 1.11.1
Using coffee-script 2.4.1
Using colorator 1.1.0
Using ruby-enum 0.7.2
Fetching commonmarker 0.17.13
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:
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 commonmarker 0.17.13 with native extensions
Fetching multi_json 1.13.1
Installing multi_json 1.13.1
Fetching sass 3.4.25
Installing sass 3.4.25
Fetching compass-core 1.0.3
Installing compass-core 1.0.3
Fetching compass-import-once 1.0.5
Installing compass-import-once 1.0.5
Using rb-fsevent 0.10.3
Fetching ffi 1.10.0
Installing ffi 1.10.0 with native extensions
Fetching rb-inotify 0.10.0
Installing rb-inotify 0.10.0
Fetching compass 1.0.3
Installing compass 1.0.3
Fetching dnsruby 1.61.2
Installing dnsruby 1.61.2
Fetching eventmachine 1.2.7
Installing eventmachine 1.2.7 with native extensions
Fetching http_parser.rb 0.6.0
Installing http_parser.rb 0.6.0 with native extensions
Using em-websocket 0.5.1
Fetching ethon 0.12.0
Installing ethon 0.12.0
Fetching multipart-post 2.0.0
Installing multipart-post 2.0.0
Fetching faraday 0.15.4
Installing faraday 0.15.4
Using forwardable-extended 2.6.0
Fetching gemoji 3.0.0
Installing gemoji 3.0.0
Fetching sawyer 0.8.1
Installing sawyer 0.8.1
Fetching octokit 4.13.0
Installing octokit 4.13.0
Fetching typhoeus 1.3.1
Installing typhoeus 1.3.1
Fetching github-pages-health-check 1.8.1
Installing github-pages-health-check 1.8.1
Using jekyll-sass-converter 1.5.2
Using ruby_dep 1.5.0
Using listen 3.1.5
Fetching jekyll-watch 2.1.2
Installing jekyll-watch 2.1.2
Using kramdown 1.17.0
Using liquid 4.0.0
Using mercenary 0.3.6
Fetching pathutil 0.16.2
Installing pathutil 0.16.2
Fetching rouge 2.2.1
Installing rouge 2.2.1
Using safe_yaml 1.0.4
Fetching jekyll 3.7.4
Installing jekyll 3.7.4
Fetching jekyll-avatar 0.6.0
Installing jekyll-avatar 0.6.0
Fetching jekyll-coffeescript 1.1.1
Installing jekyll-coffeescript 1.1.1
Fetching jekyll-commonmark 1.2.0
Installing jekyll-commonmark 1.2.0
Fetching jekyll-commonmark-ghpages 0.1.5
Installing jekyll-commonmark-ghpages 0.1.5
Fetching jekyll-default-layout 0.1.4
Installing jekyll-default-layout 0.1.4
Fetching jekyll-feed 0.11.0
Installing jekyll-feed 0.11.0
Fetching jekyll-gist 1.5.0
Installing jekyll-gist 1.5.0
Fetching jekyll-github-metadata 2.9.4
Installing jekyll-github-metadata 2.9.4
Fetching mini_portile2 2.4.0
Installing mini_portile2 2.4.0
Fetching nokogiri 1.10.1
Installing nokogiri 1.10.1 with native extensions
Fetching html-pipeline 2.10.0
Installing html-pipeline 2.10.0
Fetching jekyll-mentions 1.4.1
Installing jekyll-mentions 1.4.1
Fetching jekyll-optional-front-matter 0.3.0
Installing jekyll-optional-front-matter 0.3.0
Fetching jekyll-paginate 1.1.0
Installing jekyll-paginate 1.1.0
Fetching jekyll-readme-index 0.2.0
Installing jekyll-readme-index 0.2.0
Fetching jekyll-redirect-from 0.14.0
Installing jekyll-redirect-from 0.14.0
Fetching jekyll-relative-links 0.5.3
Installing jekyll-relative-links 0.5.3
Fetching rubyzip 1.2.2
Installing rubyzip 1.2.2
Fetching jekyll-remote-theme 0.3.1
Installing jekyll-remote-theme 0.3.1
Using jekyll-seo-tag 2.5.0
Fetching jekyll-sitemap 1.2.0
Installing jekyll-sitemap 1.2.0
Fetching jekyll-swiss 0.4.0
Installing jekyll-swiss 0.4.0
Fetching jekyll-theme-architect 0.1.1
Installing jekyll-theme-architect 0.1.1
Fetching jekyll-theme-cayman 0.1.1
Installing jekyll-theme-cayman 0.1.1
Fetching jekyll-theme-dinky 0.1.1
Installing jekyll-theme-dinky 0.1.1
Fetching jekyll-theme-hacker 0.1.1
Installing jekyll-theme-hacker 0.1.1
Fetching jekyll-theme-leap-day 0.1.1
Installing jekyll-theme-leap-day 0.1.1
Fetching jekyll-theme-merlot 0.1.1
Installing jekyll-theme-merlot 0.1.1
Fetching jekyll-theme-midnight 0.1.1
Installing jekyll-theme-midnight 0.1.1
Fetching jekyll-theme-minimal 0.1.1
Installing jekyll-theme-minimal 0.1.1
Fetching jekyll-theme-modernist 0.1.1
Installing jekyll-theme-modernist 0.1.1
Fetching jekyll-theme-primer 0.5.3
Installing jekyll-theme-primer 0.5.3
Fetching jekyll-theme-slate 0.1.1
Installing jekyll-theme-slate 0.1.1
Fetching jekyll-theme-tactile 0.1.1
Installing jekyll-theme-tactile 0.1.1
Fetching jekyll-theme-time-machine 0.1.1
Installing jekyll-theme-time-machine 0.1.1
Fetching jekyll-titles-from-headings 0.5.1
Installing jekyll-titles-from-headings 0.5.1
Fetching jemoji 0.10.1
Installing jemoji 0.10.1
Using minima 2.5.0
Fetching unicode-display_width 1.4.1
Installing unicode-display_width 1.4.1
Fetching terminal-table 1.8.0
Installing terminal-table 1.8.0
Fetching github-pages 193
Installing github-pages 193
Fetching sass-media_query_combiner 0.0.7
Installing sass-media_query_combiner 0.0.7
Bundle complete! 4 Gemfile dependencies, 91 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from compass:
Compass is charityware. If you love it, please donate on our behalf at http://umdf.org/compass Thanks!
Post-install message from dnsruby:
Installing dnsruby...
For issues and source code: https://github.com/alexdalitz/dnsruby
For general discussion (please tell us how you use dnsruby): https://groups.google.com/forum/#!forum/dnsruby
Post-install message from html-pipeline:
-------------------------------------------------
Thank you for installing html-pipeline!
You must bundle Filter gem dependencies.
See html-pipeline README.md for more details.
https://github.com/jch/html-pipeline#dependencies
-------------------------------------------------

It might also be that you have mistakenly installed multiple dependencies of Jekyll. In that case
$ /usr/bin/jekyll serve
might work, or remove the one or more installation of Jekyll.
Find
$ whereis jekyll
and then keep the above one and remove the rest of the installations.

I found a solution, that I think is very not clean, but works for now.
I have two directories in /Library/Ruby/Gems/:
2.0.0/
gems/
specifications/
...
2.3.0/
gems/
specifications/
...
The error output, when I try to run jekyll, tells that it checks (among others) in /Library/Ruby/Gems/2.3.0, but as I said in my question, there aren't any jekyll-related file in there.
So, I manually copied all the files from /Library/Ruby/Gems/2.0.0/gems and /Library/Ruby/Gems/2.0.0/specifications and pasted them in /Library/Ruby/Gems/2.3.0/gems and /Library/Ruby/Gems/2.3.0/specifications respectively.
I guess that the files I've copied are maybe outdated for the Ruby version I have (?), but it works perfectly.
Maybe there is a more conventional way to make it work?

Related

I am not able to install any new gem in my rails application.Its a issue related to bundler

Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (~> 5.2) was resolved to 5.2.3, which depends on
bundler (>= 1.3.0)
solargraph was resolved to 0.38.0, which depends on
bundler (>= 1.17.2)
Current Bundler version:
bundler (1.16.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (>= 1.17.2)', which is required by gem 'rails (~> 5.2)', in any of the sources.
ERROR: 6
I am using ruby version 2.5.1 on my device and rvm is not installed earlier the version of ruby 3.0.2 but our project is of version 2.5.1. But while installing any new gem and hitting bundle install it shows this particular error
sudo docker-compose run --rm --no-deps web bundle install

jekyll-docs not installing on macOS

Jekyll's document says,
If you’re interested in browsing these docs on-the-go, install the
jekyll-docs gem and run jekyll docs in your terminal.
When I tried to install jekyll-docs on my MacBook Air running macOS Sierra, I bumped into the following problem:
sunqingyaos-MacBook-Air:myblog sunqingyao$ jekyll docs
You must install the 'jekyll-docs' gem to use the 'jekyll docs' command.
sunqingyaos-MacBook-Air:myblog sunqingyao$ sudo gem install jekyll-docs
Successfully installed jekyll-docs-3.3.0
Parsing documentation for jekyll-docs-3.3.0
1 gem installed
sunqingyaos-MacBook-Air:myblog sunqingyao$ jekyll docs
You must install the 'jekyll-docs' gem to use the 'jekyll docs' command.
sunqingyaos-MacBook-Air:myblog sunqingyao$
As you can see, rubygems told me it has successfully installed jekyll-docs-3.3.0, while jekyll docs kept falling. I've restarted the terminal, still not working.
Had the same issue.
In my case I had two jekyll gems:
sergpank$ gem list jekyll
*** LOCAL GEMS ***
jekyll (3.4.0, 3.3.1)
jekyll-docs (3.3.1)
jekyll-feed (0.8.0)
jekyll-sass-converter (1.5.0)
jekyll-watch (1.5.0)
I have simply uninstalled 3.4.0 (because there was no jekyll-docs-3.4.0):
sergpank$ gem uninstall jekyll -v 3.4.0
Successfully uninstalled jekyll-3.4.0
---------------------------------------
sergpank$ gem list jekyll
*** LOCAL GEMS ***
jekyll (3.3.1)
jekyll-docs (3.3.1)
jekyll-feed (0.8.0)
jekyll-sass-converter (1.5.0)
jekyll-watch (1.5.0)
After what jekyll docs was successfully started!

Unable to install public_suffix while trying to install bundle for Jekyll Github pages

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?

Bundle install: Gem::InstallError: listen requires Ruby version >= 2.2.3, ~> 2.2

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

Can't install ffi 1.9.0 via rvm bundle install - OSX 10.8.4

Using OSX 10.8.4 on Macbook Pro with homebrew, xcode (with command line tools) and libffi.
I have installed rvm and ruby-1.9.3-p448 and have a gemset called omega.ecoop. There is a gemfile which lists gems that are required for this project. However, I can't get them installed, after running bundle check:
Bundler can't satisfy your Gemfile's dependencies.
This is correct as they are not installed. So I use:
bundle install
which produces the following:
Sams-MacBook-Pro:ecoop Sam$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using addressable (2.3.5)
Using chunky_png (1.2.8)
Using fssm (0.2.10)
Using sass (3.2.10)
Using compass (0.12.2)
Using breakpoint (2.0.6)
Using coderay (1.0.9)
Using compass-blend-modes (0.0.2)
Using color-schemer (0.2.5)
Using compass-normalize (1.4.3)
Using compass-rgbapng (0.2.1)
Using compass-validator (3.0.1)
Using css_parser (1.3.5)
Using eventmachine (1.0.3)
Using http_parser.rb (0.5.3)
Using em-websocket (0.5.0)
Installing ffi (1.9.0)
All going well, until:
Installing ffi (1.9.0)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/Sam/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for ffi.h... no
checking for ffi.h in /usr/local/include,/usr/include/ffi... no
checking for rb_thread_blocking_region()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_call_without_gvl()... yes
checking for ffi_prep_cif_var()... no
creating extconf.h
creating Makefile
make
mkdir -p "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64; (if [ ! -f "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64/Makefile ]; then echo "Configuring libffi for x86_64"; cd "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64 && env CC=" gcc-4.6" CFLAGS="-arch x86_64 " LDFLAGS="-arch x86_64" "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c/libffi"/configure --disable-static --with-pic=yes --disable-dependency-tracking --host=x86_64-apple-darwin > /dev/null; fi); env MACOSX_DEPLOYMENT_TARGET=10.4 make -C "/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64
Configuring libffi for x86_64
configure: WARNING: if you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used
configure: error: in `/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c/libffi-x86_64':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** No targets specified and no makefile found. Stop.
make: *** ["/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c"/libffi-x86_64/.libs/libffi_convenience.a] Error 2
Gem files will remain installed in /Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0 for inspection.
Results logged to /Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.9.0/ext/ffi_c/gem_make.out
An error occurred while installing ffi (1.9.0), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.0'` succeeds before bundling.
This command does not work either (gem install ffi -v '1.9.0'), I get the same error. I tried:
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
I have read:
can't setup ruby environment - installing fii gem error
Bundle update fails on ffi
Bundle update fails on ffi
Error installing ffi
gem install ffi -v '1.1.5' osx 10.8
Still no luck though. I followed this guide to set up RVM:
http://portertech.ca/2010/03/26/homebrew--rvm--awesome/
If this helps, ffi-1.0.11 installs without hitch, fff-1.9.0 will not install (http://rubygems.org/gems/ffi/versions).
/Users/Sam/.rvm/gems/ruby-1.9.3-p448#omega.ecoop/gems/ffi-1.0.11 (no problem)
I wanted to use command line only (rather than jewelrybox GUI) to learn some new skills along the way but fairly stuck here. Any help would be appreciated, thanks.
EDIT
So I tried a different approach, I thought maybe it was the version of ruby that was not compatible:
rvm install 2.0.0
then create gemset this time using ruby 2.0.0
rvm use 2.0.0#omega.ecoop --create
Check it's there and selected as the current gemset (ready to install some gems)
rvm gemset list
gemsets for ruby-2.0.0-p247 (found in /Users/Sam/.rvm/gems/ruby-2.0.0-p247)
(default)
global
=> omega.ecoop
Yep all good. Try and install
bundle install
Sams-MacBook-Pro:ecoop Sam$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing addressable (2.3.5)
Installing chunky_png (1.2.8)
Installing fssm (0.2.10)
Installing sass (3.2.10)
Installing compass (0.12.2)
Installing breakpoint (2.0.6)
Installing coderay (1.0.9)
Installing compass-blend-modes (0.0.2)
Installing color-schemer (0.2.5)
Installing compass-normalize (1.4.3)
Installing compass-rgbapng (0.2.1)
Installing compass-validator (3.0.1)
Installing css_parser (1.3.5)
Installing eventmachine (1.0.3)
Installing http_parser.rb (0.5.3)
Installing em-websocket (0.5.0)
Installing ffi (1.9.0)
Installing formatador (0.2.4)
Installing rb-fsevent (0.9.3)
Installing rb-inotify (0.9.1)
Installing rb-kqueue (0.2.0)
Installing listen (1.3.0)
Installing lumberjack (1.0.4)
Installing method_source (0.8.2)
Installing slop (3.4.6)
Installing pry (0.9.12.2)
Installing thor (0.18.1)
Installing guard (1.8.2)
Installing guard-compass (0.0.8)
Installing multi_json (1.7.9)
Installing guard-livereload (1.4.0)
Installing guard-shell (0.5.1)
Installing oily_png (1.1.0)
Installing rb-fchange (0.0.6)
Installing sass-globbing (1.1.0)
Installing sassy-strings (1.0.0)
Installing singularitygs (1.1.2)
Installing susy (1.0.9)
Installing toolkit (1.3.7)
Installing yajl-ruby (1.1.0)
Using bundler (1.3.5)
Your bundle is complete!
No problems with 'Installing ffi (1.9.0)' this time. Then I removed ruby 1.9.3 as I only use it for compass/sass/susy at the moment and if 2.0.0 works, so be it.
Sams-MacBook-Pro:~ Sam$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
Sams-MacBook-Pro:~ Sam$ cd drupal/ecoop/sites/default/themes/ecoop/
ruby-1.9.3-p448 is not installed.
To install do: 'rvm install ruby-1.9.3-p448' <<<<<< no thanks
Sams-MacBook-Pro:ecoop Sam$ compass watch
>>> Change detected at 12:35:09 to: reset.scss
overwrite css/reset.css
overwrite css/styles.css
>>> Compass is watching for changes. Press Ctrl-C to Stop.
Works fine for my project now. Not sure of any consequences of using a newer version of ruby but lost enough time already, need to do some designing. Obviously this wont help someone who needs 1.9.3 so that original query of why ffi wouldn't install is yet to be addressed.
Sams-MacBook-Pro:~ Sam$ cd drupal/ecoop/sites/default/themes/ecoop/
ruby-1.9.3-p448 is not installed.
To install do: 'rvm install ruby-1.9.3-p448' <<<<<< no thanks
Your .ruby-version file in that directory is still 1.9.3.
My two cents- well, tuppenny.
I encountered this issue whilst trying to install an Omega 4 subtheme in Drupal when running bundle install before step 11 (which isn't mentioned in the guide... sigh.)
Omega has loads of placeholders called {{ THEME }} which are meant to be replaced by your custom theme name- and somehow (forgive me as I know nothing about Ruby!) it tried to use this weird placeholder with spaces in the gemfile.
It also tried to save the gems to the folder /home/ubuntu/.rvm/gems/ruby-1.9.3-p547#omega.{{ THEME }}/gems, which I knew looked suss.
To resolve it I did the following:
rvm use 1.9.3-p547#omega.subthemename --create
rvm gemset list
gemsets for ruby-1.9.3-p547 (found in /home/ubuntu/.rvm/gems/ruby-1.9.3-p547)
(default)
global
=> omega.mysubtheme
omega.{{ THEME }}
bundle install # This now works!
Hope this helps someone! The conclusion is that this is usually a problem with filename spaces somewhere- a lot of people have issues with OSX because it resolves the path to "Macintosh HD" which is an invalid name.
You need to make sure you have gcc46 installed.
Try brew install gcc46 and then re-run bundle install.
Usually when I have this issue it the solution is to make sure Xcode is updated.

Resources