ippa / chingu

OpenGL accelerated 2D game framework for Ruby
http://ippa.se/chingu
GNU Lesser General Public License v2.1
309 stars 66 forks source link

Unable to get the library working on ubuntu #45

Closed Era-Dorta closed 12 years ago

Era-Dorta commented 12 years ago

Hello, I installed chingu trought gem install chingu, and used it without a problem. But then I decided to download the code and when I do the "require", I get the following errors:

/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require': /home/garoe/Aptana Studio 3 Workspace/chingu/lib/chingu/gosu_ext/sample.rb:41: odd number list for Hash (SyntaxError) volume: DEFAULT_VOLUME, ^ /home/garoe/Aptana Studio 3 Workspace/chingu/lib/chingu/gosu_ext/sample.rb:41: syntax error, unexpected ':', expecting '}' volume: DEFAULT_VOLUME, ^ /home/garoe/Aptana Studio 3 Workspace/chingu/lib/chingu/gosu_ext/sample.rb:41: dynamic constant assignment from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire' from /home/garoe/Aptana Studio 3 Workspace/chingu/lib/chingu/require_all.rb:91:in require_all' from /home/garoe/Aptana Studio 3 Workspace/chingu/lib/chingu/require_all.rb:89:ineach' from /home/garoe/Aptana Studio 3 Workspace/chingu/lib/chingu/require_all.rb:89:in `require_all' from /home/garoe/Aptana Studio 3 Workspace/chingu/lib/chingu.rb:38

I'm working with ruby 1.8.7 on ubuntu 11.04 64 bits. Any help is apreciated :-)

ippa commented 12 years ago

Have you tried with Ruby 1.9? no real reason to run old slow 1.8 anymore :)

Era-Dorta commented 12 years ago

I had issues with rvm and qt on 1.9, so that is why I use 1.8

ippa commented 12 years ago

I see... hm. I haven't used 1.8 in ages so I'm not testing chingu against it. The errors looks like it's due to 1.9s new hash-format. I would try again to get 1.9 running.. chingu is developed on it and it really makes sense having that speed-boost when making a game.

Era-Dorta commented 12 years ago

Ok, thaks for the instant reponse, I am trully amazed. I'll retry ruby 1.9 to see if this time I am luckier

Era-Dorta commented 12 years ago

I succed instaling 1.9.2 and got everything working, but then another problem appears, songs make everything crash, apparently due to the new muted seccion.

:~/Aptana Studio 3 Workspace/chinguoriginal/examples$ ruby game1.rb /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/window.rb:247:in muted?': undefined method>' for nil:NilClass (NoMethodError) from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/window.rb:219:in effective_volume' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/gosu_ext/sample.rb:12:ineffective_volume' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/gosu_ext/sample.rb:60:in effective_volume' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/gosu_ext/sample.rb:67:inplay' from game1.rb:335:in fire' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/helpers/input_dispatcher.rb:83:in[]' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/helpers/input_dispatcher.rb:83:in block in dispatch_actions' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/helpers/input_dispatcher.rb:80:ineach' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/helpers/input_dispatcher.rb:80:in dispatch_actions' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/helpers/input_dispatcher.rb:64:inblock in dispatch_input_for' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/helpers/input_dispatcher.rb:62:in each' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/helpers/input_dispatcher.rb:62:indispatch_input_for' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/game_state.rb:173:in block in update' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/game_state.rb:173:ineach' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/game_state.rb:173:in update' from game1.rb:85:inupdate' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/game_state_manager.rb:250:in update' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/window.rb:144:inintermediate_update' from /home/garoe/Aptana Studio 3 Workspace/chinguoriginal/lib/chingu/window.rb:112:in update' from game1.rb:670:in

'

ippa commented 12 years ago

good work with the 1.9! .. I'll try to take a look at this tomorrow. you did install chingu with "gem install chingu --pre"? if not, try that.

Era-Dorta commented 12 years ago

In fact I did a double instalation, one with gems and another directly from git so I could play with the code, the error I got comes from git's code. Anyway using "gem install chingu --pre" does work with the sound, and let's me play around on second but then It crashes T.T : :~$ ruby /var/lib/gems/1.9.1/gems/chingu-0.9rc7/examples/game1.rb /var/lib/gems/1.9.1/gems/chingu-0.9rc7/lib/chingu/animation.rb:75:in load_tiles': Unknown error (RuntimeError) from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/lib/chingu/animation.rb:75:ininitialize' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/examples/game1.rb:276:in new' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/examples/game1.rb:276:insetup' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/lib/chingu/basic_game_object.rb:87:in initialize' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/lib/chingu/basic_game_object.rb:100:innew' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/lib/chingu/basic_game_object.rb:100:in create' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/examples/game1.rb:103:inupdate' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/lib/chingu/game_state_manager.rb:280:in update' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/lib/chingu/window.rb:144:inintermediate_update' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/lib/chingu/window.rb:112:in update' from /var/lib/gems/1.9.1/gems/chingu-0.9rc7/examples/game1.rb:386:in

' AL lib: ALc.c:1818: alcCloseDevice(): deleting 1 Buffer(s)

ippa commented 12 years ago

Fixed in https://github.com/ippa/chingu/commit/0271b2431e169fa4d937016253f38efd57732237

I couldn't push a new gem now cause rubygems.org gives me an odd 500 internal server error. I'll try again soonish. In the meantime, the github source is fixed so feel free to build your own gem from it.

jlnr commented 12 years ago

Great to see you push out chingu's HEAD as gem again. :)

And incidentally I am getting weird server errors today too.

ippa commented 12 years ago

Hi Julian! ;) ... gem push seems to work now btw, so a fixed rc8 should be out. "gem install chingu --pre"

jlnr commented 12 years ago

I still get "413 Request Entity Too Large" when pushing Gosu for Mac, so I cannot even install chingu because it depends on Gosu 0.7.43. :D Let's see when the rubygems guys show up on IRC.