C:\Ruby21-x64\bin>.\gem ins gosu --source http://rubygems.org
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing gosu:
ERROR: Failed to build gem native extension.
C:/Ruby21-x64/bin/ruby.exe extconf.rb
This gem is not meant to be installed on Windows. Instead, please use:
gem install gosu --platform=i386-mingw32
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gosu-0.8.6 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/gosu-0.8.6/gem_make.out
--platform=x64-mingw32
, but there was no change in the response.--source http://rubygems.org
work-around?
ruby -e "puts RUBY_PLATFORM"
?gem update --system
.
> What is the output of ruby -e "puts RUBY_PLATFORM"?
> I am using the x64 RubyInstaller build of Ruby 2.1, but no DevKit. The only thing I did before installing Gosu was gem update --system.
D:\devgosu>ruby -e "require 'gosu'"
C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- gosu.so (LoadError)
from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in
require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gosu-0.8.6-x64-mingw32/lib/gosu.rb:16:in rescue in <top (required)>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gosu-0.8.6-x64-mingw32/lib/gosu.rb:11:in
<top (required)>'
from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in require'
from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in
rescue in require'
from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in require'
from -e:1:in
<main>'
C:\Ruby21-x64\lib\ruby\gems\2.1.0\gems\gosu-0.8.6-x64-mingw32\lib\gosu.rb
you can see that it tries to require the version-specific binary first, and then below rescue LoadError
it tries to fall back to gosu.so
(which is built by the extconf.rb
on other platforms).rescue LoadError
and the line directly below it, what is the error message?
ruby -e "require 'gosu'"
C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in require': cannot load such file -- ../lib64/2.1/gosu.so (LoadError)
from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in
rescue in require'
from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/gosu-0.8.6-x64-mingw32/lib/gosu.rb:16:in
<top (required)>'
from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in require'
from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:128:in
rescue in require'
from C:/Ruby21-x64/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in require'
from -e:1:in
<main>'
gosu.so
actually works. For that I usually require it from irb using an absolute filename, then I verify that Gosu::Window.new(100,100,false).show()
shows a window as expected.gosu.so
works and it's only that require
can't find it, maybe you could play around with the path - it might be something really silly like the difference between / and \? (So far I've been lucky and / has worked consistently)Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill