Errno::EACCES: Permission denied # rb_sysopen error when running Bundle Install - ruby

When I run Bundle Install I get the following error:
mark$ 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 builder 3.2.2
Using ffi 1.9.14
Using gherkin 4.0.0
Using cucumber-wire 0.0.1
Using diff-lcs 1.2.5
Using multi_json 1.11.2
Using multi_test 0.1.2
Using rubyzip 1.2.0
Using websocket 1.2.3
Using bundler 1.11.2
Using childprocess 0.5.9
Using cucumber-core 1.5.0
Installing selenium-webdriver 2.53.4
Errno::EACCES: Permission denied # rb_sysopen - /Users/mark/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/selenium-webdriver-2.53.4/CHANGES
Using cucumber 2.4.0
An error occurred while installing selenium-webdriver (2.53.4), and Bundler
cannot continue.
Make sure that `gem install selenium-webdriver -v '2.53.4'` succeeds before
bundling.
Any help how to resolve this would be greatly appreciated.

Related

Could not find rake-12.3.3 in any of the sources when using fastlane

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)

Error: Could not find sqlite3-1.4.0 in any of the sources

I'm currently trying to get a run.rb file going, but I keep getting errors with sqlite3. When I type bundle install, I get this success message:
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 12.3.2
Using concurrent-ruby 1.1.4
Using i18n 1.5.3
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.2
Using activemodel 5.2.2
Using arel 9.0.0
Using activerecord 5.2.2
Using bundler 2.0.1
Using coderay 1.1.2
Using equatable 0.5.0
Using method_source 0.9.2
Using mustermann 1.0.3
Using necromancer 0.4.0
Using tty-color 0.4.3
Using pastel 0.7.2
Using pry 0.12.2
Using rack 2.0.6
Using rack-protection 2.0.5
Using require_all 2.0.0
Using tilt 2.0.9
Using sinatra 2.0.5
Using sinatra-activerecord 2.0.13
Using sqlite3 1.4.0
Using timers 4.3.0
Using tty-cursor 0.6.0
Using tty-screen 0.6.5
Using wisper 2.0.0
Using tty-reader 0.5.0
Using tty-prompt 0.18.1
Bundle complete! 7 Gemfile dependencies, 32 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
However, when running ruby app/run.rb I get this message:
Could not find sqlite3-1.4.0 in any of the sources
I've been trying for hours to figure out what the issue is, I've uninstalled and reinstalled sqlite3, bundle installed a million times, and nothing seems to be working. Any ideas would be much appreciated!
For Rails 5.2.2 you can sort out this problem by specifying proper version of sqlite3 in your Gemfile:
gem 'sqlite3', '~> 1.3.6'
In 5-2-stable branch of Rails you can use sqlite 1.4, but in the 5.2.2 it causes the error.
I had the same error and fixed it by:
First, I opened up the Gemfile in atom and changed the line gem 'sqlite3' to gem 'sqlite3' , '~>1.3.6'.
Second, I ran gem install sqlite3 -v 1.3.6 on terminal.
Last, I ran bundle install on terminal.
This worked for me... goodluck!
You can try installing the libsqlite3-dev package:
sudo apt-get install -y sqlite3 libsqlite3-dev
or
gem 'sqlite3', '~> 1.3', '>= 1.3.11'
I had the same issue and found that I didn't need sqlite to run my app.
So, I opened the Gemfile and deleted gem 'sqlite3' ... from it and everything worked fine.

Why is my jekyll command not working anymore?

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?

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

Resources