Why isn't gosu working.

379 views
Skip to first unread message

cj

unread,
Mar 3, 2012, 5:28:56 PM3/3/12
to ur...@googlegroups.com
This code is from a kidsruby tutorial on gosu.

It works in kids ruby. So the code is sound.
But why can't I run it from the terminal.
I copied the code into Text Wrangler and try to run it in the terminal.

This is the error message.

<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- gosu (LoadError)
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from gosugame.rb:1:in `<main>'

Does this have something to do with where Gosu is on my computer?

Much thanks.
Chad

Peter Hamilton

unread,
Mar 3, 2012, 9:29:04 PM3/3/12
to ur...@googlegroups.com
do you have gosu installed?

Generally you want to do something like 'gem install gosu' in order to get it installed.  You may need to add "require 'rubygems'" to your application (before gosu) so the system can find it.



--
Utah Ruby Users Group
ur...@googlegroups.com
http://utruby.org
http://bit.ly/urug_lunches
http://groups.google.com/group/urug/
- All meeting times and places can be found here.
 
** Please prefix your subject with "[JOB]" if your message is about job opportunities.

cj

unread,
Mar 3, 2012, 9:46:07 PM3/3/12
to ur...@googlegroups.com
Yes. It came with my mac.
I got it to work. I added require 'rubygems'
But I'm still confused. If I select 'run'  in text wrangler the program runs. But it won't run via the terminal. Why?
--
Save a life. Become an organ donor. www.donatelife.net

Peter Hamilton

unread,
Mar 3, 2012, 9:56:26 PM3/3/12
to ur...@googlegroups.com
Rubygems sets some environment variables that help the application find the correct gems.  Textwrangler probably sets those itself before running the application.
Reply all
Reply to author
Forward
0 new messages