guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

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

Closed Giriraj24 closed 8 years ago

Giriraj24 commented 8 years ago

hi All,

I am using windows 7 and trying to run bundle install. I have been trying this from 2 weeks and getting 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:/opscod e/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:/opscod e/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 f ind -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.ou t 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:/opscod e/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:/opscod e/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 f ind -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.ou t 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 installed successfully ffi-yajl but 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.

Thanks, Giriraj

Giriraj24 commented 8 years ago

@neurogenesis , I read your comment on issue 382, How did you solved it? I am also using chefdk.

@e2 , Could you please guide me what to do?

Giriraj24 commented 8 years ago

@@neurogenesis , @e2 : May be issue could be that It is using ruby version which came with chefdk(2.1), How can I use chefdk to use my system ruby or How can I upgrade chefDK ruby to 2.2 version?

Help me pls.

e2 commented 8 years ago

@Giriraj24 - in the future, paste the output to a Gist, because it's easier to read, scroll through and work out what's wrong. Also, I can then bookmark which lines I'm referring to.

First, I'd recommend upgrading Ruby to 2.2.5 or 2.3.1 if you can. Those are officially recommended Ruby versions to migrate to as of today (by the Ruby core developers).

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.

I also think you can remove yajl-ruby from your gems to progress forward with this.

Giriraj24 commented 8 years ago

Hi @e2 ,

This is what I did. I uninstalled ruby from /c/Ruby22-x64/bin/ruby and I tried upgrading my ruby to 2.2.4 and put it on the same path (/c/opscode/chefdk/embedded/bin) where chefdk is but got the following error when run bundle install:

$ bundle install C:/opscode/chefdk/embedded/bin/bundle:22:in <main>': undefined methodactivate_bin_path' for Gem:Module (NoMethodError) ~/githubci/og_app_bp-poa-ui (master)

$ gem install bundler ERROR: Loading command: install (LoadError) 127: The specified procedure could not be found. - C:/opscode/chefdk/embedded/lib/ruby/2.2.0/x64-mingw32/openssl.so ERROR: While executing gem ... (NoMethodError) undefined method `invoke_with_build_args' for nil:NilClass

Any idea about these errors? Did I installed it correctly? I chose chefdk path because it also comes with ruby.

Thanks, Giriraj

e2 commented 8 years ago

@Giriraj24 - the issues you have are no longer related to Listen, so I can't spend too much time helping you. I also don't use Windows, so I can't help there either. You should try searching the errors you're getting online and/or ask on a site like http://stackoverflow.com

What I can help you with is: run the command gem env and paste the output of your error when you ask for help like this. gem env will show if you have the setup correct. I'm guessing that you didn't upgrade properly or the old paths are still being used. However, I don't know how to set this up on Windows (and I don't want to learn, either).

So ask your question on StackOverflow and be SURE to include the following:

  1. The second error you're getting
  2. The output of gem env (hint: you may have to set GEM_HOME and GEM_PATH manually in your environment variables, but don't ask me how since I don't know Windows)

Good luck!