Cant install capybara webkit on Mac - ruby

been trying to bundle using
QT_SELECT=5 bundle install
but keep running into this error
ridgedon#Ridges-MacBook-Pro webkit-server % QT_SELECT=5 bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 13.0.1
Using CFPropertyList 2.3.2
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Using json 1.8.6
Using minitest 5.14.0
Using thread_safe 0.3.6
Using tzinfo 1.2.6
Using activesupport 4.2.4
Using builder 3.2.4
Using erubis 2.7.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.7
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.9
Using crass 1.0.6
Using loofah 2.4.0
Using rails-html-sanitizer 1.3.0
Using actionview 4.2.4
Using rack 1.6.4
Using rack-test 0.6.3
Using actionpack 4.2.4
Using globalid 0.3.6
Using activejob 4.2.4
Using mime-types 2.99.3
Using mail 2.6.3
Using actionmailer 4.2.4
Using activemodel 4.2.4
Using arel 6.0.4
Using activerecord 4.2.4
Using acts-as-taggable-on 3.5.0
Using acts_as_list 0.9.0
Using addressable 2.4.0
Using excon 0.45.4
Using formatador 0.2.5
Using fog-core 1.37.0
Using multi_json 1.11.2
Using fog-json 1.0.2
Using ipaddress 0.8.0
Using xml-simple 1.1.5
Using fog-aliyun 0.1.0
Using fog-xml 0.1.3
Using fog-atmos 0.1.0
Using fog-aws 0.7.6
Using inflecto 0.0.2
Using fog-brightbox 0.9.0
Using fog-dynect 0.0.2
Using fog-ecloud 0.3.0
Using fog-google 0.1.0
Using fog-local 0.2.1
Using fog-powerdns 0.1.1
Using fog-profitbricks 0.0.5
Using fog-radosgw 0.0.4
Using fog-riakcs 0.1.0
Using fog-sakuracloud 1.4.0
Using fog-serverlove 0.1.2
Using fog-softlayer 1.0.2
Using fog-storm_on_demand 0.1.1
Using fog-terremark 0.1.0
Using fission 0.5.0
Using fog-vmfusion 0.1.0
Using fog-voxel 0.1.0
Using fog-xenserver 0.2.2
Using fog 1.36.0
Using thor 0.20.3
Using railties 4.2.4
Using javascript_dlog-rails 1.0.1
Using sass 3.4.19
Using jquery-fileupload-rails 0.4.6
Using simple_form 3.2.0
Using anaconda 2.0.2
Using execjs 2.6.0
Using autoprefixer-rails 6.0.3
Using aws-eventstream 1.0.2
Using aws-sigv4 1.1.0
Using jmespath 1.4.0
Using aws-sdk-core 2.11.257
Using aws-sdk-resources 2.11.257
Using aws-sdk 2.11.257
Using bcrypt 3.1.13
Using coderay 1.1.1
Using better_errors 2.1.1
Using debug_inspector 0.0.2
Using binding_of_caller 0.7.2
Using bootstrap-datepicker-rails 1.4.0
Using kaminari 0.16.3
Using bundler 1.17.3
Using sprockets 3.4.0
Using sprockets-rails 2.3.3
Using rails 4.2.4
Using bootstrap-kaminari-views 0.0.5
Using bootstrap-sass 3.3.5.1
Using mimemagic 0.3.3
Using carrierwave 0.11.2
Using mini_magick 4.10.1
Using remotipart 1.4.2
Using bootsy 2.1.0
Using bugsnag 6.8.0
Using uniform_notifier 1.10.0
Using bullet 5.6.1
Using byebug 6.0.2
Using colorize 0.7.7
Using net-ssh 3.0.1
Using net-scp 1.2.1
Using sshkit 1.7.1
Using capistrano 3.4.0
Using capistrano-bundler 1.1.4
Using capistrano-rails 1.1.3
Using xpath 2.1.0
Using capybara 2.5.0
Using launchy 2.4.3
Using capybara-screenshot 1.0.17
Fetching capybara-webkit 1.7.1
Installing capybara-webkit 1.7.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
/Users/ridgedon/.rvm/rubies/ruby-2.6.3/bin/ruby -I /Users/ridgedon/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r
./siteconf20201008-48198-i94z8h.rb extconf.rb
Info: creating stash file /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/.qmake.stash
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server
/Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib
-L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) &&
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 3
Command 'make' failed
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
make "DESTDIR=" clean
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server
/Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib
-L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) &&
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server clean
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-clean-ordered] Error 3
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
make "DESTDIR="
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server
/Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib
-L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) &&
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 3
make failed, exit code 2
Gem files will remain installed in /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1 for inspection.
Results logged to /Users/ridgedon/.rvm/gems/ruby-2.6.3/extensions/x86_64-darwin-20/2.6.0/capybara-webkit-1.7.1/gem_make.out
An error occurred while installing capybara-webkit (1.7.1), and Bundler cannot continue.
Make sure that `gem install capybara-webkit -v '1.7.1' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
capybara-webkit
and whenever I run
gem install capybara-webkit -v '1.7.1' --source 'https://rubygems.org/'
I get
Building native extensions. This could take a while...
ERROR: Error installing capybara-webkit:
ERROR: Failed to build gem native extension.
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
/Users/ridgedon/.rvm/rubies/ruby-2.6.3/bin/ruby -I /Users/ridgedon/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r ./siteconf20201008-48386-1xgbddp.rb extconf.rb
Info: creating stash file /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/.qmake.stash
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 3
Command 'make' failed
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
make "DESTDIR=" clean
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server clean
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-clean-ordered] Error 3
current directory: /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1
make "DESTDIR="
cd src/ && ( test -e Makefile.webkit_server || /usr/local/opt/qt/bin/qmake -o Makefile.webkit_server /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1/src/webkit_server.pro 'LIBS += -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl#1.1/lib' ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.webkit_server
Project ERROR: Unknown module(s) in QT: webkitwidgets
make: *** [sub-src-webkit_server-pro-make_first-ordered] Error 3
make failed, exit code 2
Gem files will remain installed in /Users/ridgedon/.rvm/gems/ruby-2.6.3/gems/capybara-webkit-1.7.1 for inspection.
Results logged to /Users/ridgedon/.rvm/gems/ruby-2.6.3/extensions/x86_64-darwin-20/2.6.0/capybara-webkit-1.7.1/gem_make.out
How can I fix this on Mac?

capybara-webkit has gone EOL - It's not worth using anymore (replicates a really old browser). Use Capybara with the Selenium driver and a headless browser, or with one of the direct to CDP drivers.

Related

Ruby gems bundle install failure

I am installing Diaspora (open source social networking) in Ubuntu 16.04 using these directions. Installation instructions call for using Ruby Version Manager to install Ruby and then using Bundler to add some required gems. Ruby installs, then the command to use the bundler
:~/diaspora$ bin/bundle install --full-index
makes some progress and then fails at this step:
Fetching unf_ext 0.0.7.4
Installing unf_ext 0.0.7.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:/home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
/home/ubuntu/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20180215-26943-187isn6.rb extconf.rb
checking for -lstdc++... yes
creating Makefile
current directory: /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
make "DESTDIR=" clean
current directory: /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4/ext/unf_ext
make "DESTDIR="
compiling unf.cc
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
virtual memory exhausted: Cannot allocate memory
Makefile:209: recipe for target 'unf.o' failed
make: *** [unf.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/gems/unf_ext-0.0.7.4 for inspection.
Results logged to /home/ubuntu/diaspora/vendor/bundle/ruby/2.4.0/extensions/x86_64-linux/2.4.0/unf_ext-0.0.7.4/gem_make.out
An error occurred while installing unf_ext (0.0.7.4), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.4'` succeeds before bundling.
In Gemfile:
asset_sync was resolved to 2.2.0, which depends on
unf was resolved to 0.1.4, which depends on
unf_ext
I updated to gcc-7 and g++-7, and appear to be using them:
:~/diaspora$ update-alternatives --display gcc
gcc - auto mode
link best version is /usr/bin/gcc-7
link currently points to /usr/bin/gcc-7
link gcc is /usr/bin/gcc
/usr/bin/gcc-7 - priority 10
:~/diaspora$ update-alternatives --display g++
g++ - auto mode
link best version is /usr/bin/g++-7
link currently points to /usr/bin/g++-7
link g++ is /usr/bin/g++
/usr/bin/g++-7 - priority 10
I also successfully installed unf_ext without Bundler using
:~/diaspora$ gem install unf_ext -v '0.0.7.4'
and it is there:
:~/diaspora$ gem list
*** LOCAL GEMS ***
bigdecimal (default: 1.3.0)
bundler (default: 1.16.1)
bundler-unload (1.0.2)
did_you_mean (1.1.0)
executable-hooks (1.3.2)
gem-wrappers (1.3.2, 1.2.7)
io-console (default: 0.4.6)
json (default: 2.0.2)
minitest (5.10.1)
net-telnet (0.1.1)
openssl (default: 2.0.3)
power_assert (0.4.1)
psych (default: 2.2.2)
rake (12.0.0)
rdoc (default: 5.0.0)
rubygems-bundler (1.4.4)
rubygems-update (2.7.5, 2.6.14)
rvm (1.11.3.9)
test-unit (3.2.3)
unf_ext (0.0.7.5, 0.0.7.4, 0.0.7.2)
xmlrpc (0.2.1)
... but the same error persists.
Looking to understand the source of the error and how to resolve.
Your box is running out of memory during the installation:
virtual memory exhausted: Cannot allocate memory
It is killing the install. You should increase your system's memory.

errors installing gem "rumember" in Ubuntu 16.4 LTS

I tried for several hours to get the rumember gem installed and running.
After a failed upgrade of my system to 16.4 Ubuntu LTS i had to reinstall the system completely (with 16.4. But now I cant get the rumember gem to work again.
I googled a lot and tried several approaches. e.g. I installed the ruby-dev package for headers and I ran sudo gem update --system
and got "Latest version currently installed ..."
I see that the json version in the errors is 1.7.7 and in my system its 1.8.3. but i don't know if that matters.
Thats how far I got. Thanks for any Ideas on the topic.
Update 1: I just tried to install it on a fresh VM Ubuntu LTS 16.4. Install ruby, install ruby-dev, gem install rumember. Same problems occur. So it's not just my setup.
sudo gem install rumember
outputs:
ERROR: Error installing rumember:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/json-1.7.7/ext/json/ext/generator
/usr/bin/ruby2.3 -r ./siteconf20161214-5373-1y3th00.rb extconf.rb
creating Makefile
current directory: /var/lib/gems/2.3.0/gems/json-1.7.7/ext/json/ext/generator
make "DESTDIR=" clean
current directory: /var/lib/gems/2.3.0/gems/json-1.7.7/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:0:
../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
../fbuffer/fbuffer.h:175:20: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
Makefile:239: recipe for target 'generator.o' failed
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /var/lib/gems/2.3.0/gems/json-1.7.7 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/json-1.7.7/gem_make.out
gem list outputs:
bigdecimal (default: 1.2.8)
bundler (1.11.2)
configuration (1.3.4)
did_you_mean (1.0.0)
diff-lcs (1.2.5)
io-console (default: 0.4.5)
json (default: 1.8.3)
launchy (0.3.7)
minitest (5.8.4)
molinillo (0.4.3)
net-http-persistent (2.9.4)
net-telnet (0.1.1)
power_assert (0.2.7)
psych (default: 2.0.17)
rake (10.5.0)
rdoc (default: 4.2.1)
rspec (3.5.0)
rspec-core (3.5.4)
rspec-expectations (3.5.0)
rspec-mocks (3.5.0)
rspec-support (3.5.0)
rubygems-update (2.0.3)
test-unit (3.1.7)
thor (0.19.1)

bcrypt-3.1.11 error when runing bundle install

I was working on a file today and all of a sudden when bundling I get an error about bcrypt 3.1.11 . I have scoured the internet as to how to solve this.
$ 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.3.0
/Users/linc/.gem/ruby/2.2.3/gems/bundler-1.11.2/lib/bundler.rb:289: warning: Insecure world writable dir /usr/local/sbin in PATH, mode 040777
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.9.1
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using pkg-config 1.1.7
Using rack 1.6.4
Using mime-types-data 3.2016.0521
Using arel 6.0.3
Using addressable 2.4.0
Installing bcrypt 3.1.11 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/linc/.rubies/ruby-2.2.3/bin/ruby -r ./siteconf20160927-27635-1pd08jr.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling bcrypt_ext.c
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/0v/x6vrj7v12hd5bghty3yqt7sr0000gn/T/bcrypt_ext-b63617.c
clang: note: diagnostic msg: /var/folders/0v/x6vrj7v12hd5bghty3yqt7sr0000gn/T/bcrypt_ext-b63617.sh
clang: note: diagnostic msg:
********************
make: *** [bcrypt_ext.o] Error 254
make failed, exit code 2
Gem files will remain installed in /Users/linc/.gem/ruby/2.2.3/gems/bcrypt-3.1.11 for inspection.
Results logged to /Users/linc/.gem/ruby/2.2.3/extensions/x86_64-darwin-14/2.2.0-static/bcrypt-3.1.11/gem_make.out
Using bundler 1.11.2
Using coderay 1.1.1
Using concurrent-ruby 1.0.2
Using docile 1.1.5
Using simplecov-html 0.10.0
Using tins 1.12.0
Using thor 0.19.1
Using orm_adapter 0.5.0
Using diff-lcs 1.2.5
Using execjs 2.7.0
Using sass 3.4.22
Using method_source 0.8.2
Using pg 0.19.0
Using slop 3.6.0
Using puma 3.6.0
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Using rspec-support 3.5.0
Using tilt 2.0.5
Using shoulda-context 1.2.1
Using valid_attribute 2.0.0
Using tzinfo 1.2.2
Using nokogiri 1.6.8
Using rack-test 0.6.3
Using warden 1.2.6
Using mime-types 3.1
Using launchy 2.4.3
An error occurred while installing bcrypt (3.1.11), and Bundler cannot continue.
Make sure that `gem install bcrypt -v '3.1.11' succeeds before bundling.
I have done the xcode-select --install and bundle installed and still get the same error.
I have gem uninstall bcrypt "3.1.11" and gem installed bcrypt "3.1.11" again and still get the same error.
Restarted computer and it began working again. Very weird bug

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