Ruby 1.9 - no such file to download 'win32 / open3'

I am running ruby ​​1.9.2 on Windows and trying to transcode the code that worked in Ruby 1.8. The code uses Open4.popen4, which previously worked fine. In version 1.9.2, I did the following:

  • Installed POpen4 via gem install POpen4
  • POpen4 required via require 'popen4'
  • Trying to use POpen4 as: Open4.popen4("cmd") {|io_in,io_out,io_er| ... } Open4.popen4("cmd") {|io_in,io_out,io_er| ... }

When I do this, I get an error: no such file to load -- win32/open3

If I try to install win32-open3 ( gem install win32-open3 ), I get an error:
win32-open3 requires Ruby version < 1.9.0

Does anyone know how to get around this problem?

+6
ruby
source share
2 answers

Didn't use it, but it might work: https://github.com/matschaffer/win32-open3-19

+14
source share

Adding

 gem "win32-open3-19", :platforms => :mingw, :git => "github.com/matschaffer/win32-open3-19.git" 

for my gemfile did not work.

Here are the steps that decided for me:

  • Add this to Gemfile -> gem 'win32-open3-19', :platforms => :mingw
  • Run the package to install win32-open3-19

That's all. For me, the git location was inactive and did not work.

+3
source share

All Articles