# Trouble with rubyscript2exe and ruby/SDL

**URL:** <https://www.ruby-forum.com/t/trouble-with-rubyscript2exe-and-ruby-sdl/132252>\
**Category:** Ruby\
**Created:** [March 18, 2008, 11:51am UTC](https://www.ruby-forum.com/t/trouble-with-rubyscript2exe-and-ruby-sdl/132252 "2008-03-18T11:51:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgeos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/eb9ed0/32.png) [@sgeos](https://www.ruby-forum.com/u/sgeos)\
**Post date:** [March 18, 2008, 11:51am UTC](https://www.ruby-forum.com/t/trouble-with-rubyscript2exe-and-ruby-sdl/132252/1 "2008-03-18T11:51:10Z")

</div>

I am having trouble getting rubyscript2exe to work with ruby/SDL.  
Using the cdrom sample:

# source start

require ‘sdl’

SDL.init( SDL::INIT\_CDROM )

print SDL::CD.numDrive,"\n"  
print SDL::CD.indexName(0),"\n"  
cd=SDL::CD.open(0)  
cd.status  
print cd.numTracks," ",cd.status, “\n”

begin  
cd.playTracks 1,0,1,0  
sleep 100  
ensure  
cd.stop  
end  
#source end

This is the output I get on the command line:

C:\Documents and Settings\USER???\brendan\dev  
\ruby\>rubyscript2exe.rb exe-test\cdrom.rb  
Tracing cdrom …  
Gathering files…  
c:/ruby/lib/ruby/site\_ruby/1.8/rubysdl\_aliases.rb:340: undefined  
method `loadFromIO' for class`SDL::Surface’ (NameError)  
from c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:  
27:in `gem_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in`require’  
from c:/ruby/lib/ruby/site\_ruby/1.8/sdl.rb:271  
from c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:  
27:in `gem_original_require' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 27:in`require’  
from exe-test/cdrom.rb:1  
Copying files…  
Creating cdrom.exe …

C:\Documents and Settings\USER???\brendan\dev\ruby\>

A google search for the following was not fruitful:  
loadFromIO SDL::Surface

Any help will be appreciated,  
-Brendan
