gosu / ashton

Special graphical effects and other extensions for the Ruby/Gosu game library (⚠️ unmaintained)
MIT License
43 stars 10 forks source link

Error when importing gem #34

Open clxe opened 9 years ago

clxe commented 9 years ago

I'm having some trouble with using the gem. I run gem install ashton and it installs ashton-0.1.4 fine. However, when I try to require "ashton" in my Ruby code, I get this error:

C:/ruby193/lib/ruby/gems/1.9.1/gems/ashton-0.1.4/lib/ashton.rb:8:in `require_rel
ative': cannot load such file -- C:/ruby193/lib/ruby/gems/1.9.1/gems/ashton-0.1.
4/lib/ashton/ashton.so (LoadError)
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/ashton-0.1.4/lib/ashton.rb:8:in
 `rescue in <top (required)>'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/ashton-0.1.4/lib/ashton.rb:4:in
 `<top (required)>'
        from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:i
n `require'
        from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:i
n `rescue in require'
        from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:i
n `require'
        from C:/Users/Jacob/Documents/GitHub/pew-pew/main.rb:6:in `<main>'

When I opened up the gems directory, I found the ashton.so file in the /lib/1.9 directory. When I copied it into /lib, I got a new error:

C:/ruby193/lib/ruby/gems/1.9.1/gems/ashton-0.1.4/lib/ashton.rb:8:in `require_rel
ative': 193: %1 is not a valid Win32 application.   - C:/ruby193/lib/ruby/gems/1
.9.1/gems/ashton-0.1.4/lib/ashton/ashton.so (LoadError)
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/ashton-0.1.4/lib/ashton.rb:8:in
 `rescue in <top (required)>'
        from C:/ruby193/lib/ruby/gems/1.9.1/gems/ashton-0.1.4/lib/ashton.rb:4:in
 `<top (required)>'
        from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:i
n `require'
        from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:i
n `rescue in require'
        from C:/ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:i
n `require'
        from C:/Users/Jacob/Documents/GitHub/pew-pew/main.rb:6:in `<main>'

I'm running Ruby 1.9.3 on Windows 8.1.

bil-bas commented 9 years ago

I know I've had a similar issue reported before, but I can't remember what the problem was. Not sure what to suggest.

bil-bas commented 9 years ago

http://www.libgosu.org/cgi-bin/mwf/topic_show.pl?pid=8105

Someone on the Gosu forums had the same problem and fixed it by downgrading to ruby 1.9.2, but not sure why that would help at all.