I installed shoes gem but I can't use it:
> gem install green_shoes
Successfully installed green_shoes-1.1.374
Parsing documentation for green_shoes-1.1.374
unable to convert "\xA9" from ASCII-8BIT to UTF-8 for lib/shoes/minitar.rb, skipping
Done installing documentation for green_shoes after 1 seconds
1 gem installed
olivier@FIXE C:\Users\olivier\Documents\ruby
> irb
irb(main):001:0> require 'green_shoes'
LoadError: cannot load such file -- gobject-introspection
from C:/Ruby23-x64/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby23-x64/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/gdk_pixbuf2-3.0.9-x64-mingw32/lib/gdk_pixbuf2.rb:17:in `<top (require
d)>'
from C:/Ruby23-x64/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby23-x64/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/green_shoes-1.1.374/lib/green_shoes.rb:5:in `<top (required)>'
from C:/Ruby23-x64/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from C:/Ruby23-x64/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from C:/Ruby23-x64/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from (irb):1
from C:/Ruby23-x64/bin/irb.cmd:19:in `<main>'
How to fix this issue?
EDIT:
I installed the 2 gems, but a simple demo program (which begins with "require 'green_shoes'", gives this error:
ruby test1.rb C:/Ruby23/lib/ruby/site_ruby/2.3.0/rubygems/specification.rb:2288:in `raise_if_conflicts': Unable to activate gobject-introspection-3.0.8-x86-mingw32, because glib2-3.0.9-x86-mingw32 conflicts with glib2 (= 3.0.8) (Gem::ConflictError)
here is the program:
require 'green_shoes'
puts "hello world"
puts Math.sqrt(9)
def say_hi(name="!")
puts "hello world #{name}"
end
say_hi("Olivier")
say_hi
class Greeter
def initialize(name)
@name=name
end
def say_hello
puts "hello #{@name.capitalize}"
end
def to_s
"I said hello!"
end
end
g=Greeter.new("olivier")
g.say_hello
puts g
# hello_world.rb
Shoes.app do
para "Hello World"
end
Shoes.app { button "Push me" }
it's a test program, it does not contain important things.
ps: I understand the conflict between the 2 versions of glib2, but I hesitate about which version to remove: I don't want to break my ruby installation. Which should I remove?
EDIT2:
there's still an issue : green_shoes requires the installation of pango and cairo, but of other versions that 3.0.8:
gem uninstall glib2 -v 3.0.9
You have requested to uninstall the gem:
glib2-3.0.9-x86-mingw32
atk-3.0.9 depends on glib2 (= 3.0.9)
gdk_pixbuf2-3.0.9 depends on glib2 (= 3.0.9)
pango-3.0.9 depends on glib2 (= 3.0.9) If you remove this gem, these dependencies will not be met.
I don't know how I should do... which version of green_shoes have you got?
ps: I just saw the rest of your edit; the strabge thing is that I have got the same version of green_shoes than yours...but for me was installed glib2-3.0.9, and for you glib2 3.0.8.... I thought at remove green_shoes, and its dependencies, then install some dependencies in 3.0.8 version, then install green_shoes and hope it does not requires 3.0.9 versions of its dependencies no more... What do you think about that?
EDIT3:
snif! it's what I was afraid of!
here is the result of the installation of green_shoes:
> gem install green_shoes
Fetching: glib2-3.0.9-x86-mingw32.gem (100%)
Successfully installed glib2-3.0.9-x86-mingw32
Fetching: green_shoes-1.1.374.gem (100%)
Successfully installed green_shoes-1.1.374
and now I have the 2 versions of glib2(3.0.8 & 3.0.9)
EDIT4:
I don't understand anything : have a look at this:
gem list glib2
* LOCAL GEMS * glib2 (3.0.9 x86-mingw32)
olivier@FIXE C:\Users\olivier\Documents\rubyruby test2.rb C:/Ruby23/lib/ruby/site_ruby/2.3.0/rubygems/specification.rb:2288:in `raise_if_conflic ts': Unable to activate gobject-introspection-3.0.8-x86-mingw32, because glib2-3.0.9-x 86-mingw32 conflicts with glib2 (= 3.0.8) (Gem::ConflictError)
I removed glib2 v 3.0.8 but there is still a conflict...
EDIT5:
I followed your advice, and removed version 3.0.9, but strangely it seems that version 3.0.8 is still needed:
ruby test2.rb C:/Ruby23/lib/ruby/site_ruby/2.3.0/rubygems/dependency.rb:310:in
to_specs': Could not find 'glib2' (= 3.0.9) - did find: [glib2-3.0.8-x86-mingw32] (Gem::MissingSpecVersionError) Checked in 'GEM_PATH=C:/Users/olivier/.gem/ruby/2.3.0;C:/Ruby23/lib/ruby/gems/2.3.0', execute
gem env` for more information
althought I removed its 3.0.8 dependencies, and let the 3.0.9 stay. still, I don't understand.