# Trouble running 'rubyscript2exe' for compiling my code

**URL:** <https://www.ruby-forum.com/t/trouble-running-rubyscript2exe-for-compiling-my-code/149300>\
**Category:** Ruby\
**Created:** [September 23, 2008, 12:49pm UTC](https://www.ruby-forum.com/t/trouble-running-rubyscript2exe-for-compiling-my-code/149300 "2008-09-23T12:49:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rubist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c67d28/32.png) [@rubist](https://www.ruby-forum.com/u/rubist)\
**Post date:** [September 23, 2008, 12:49pm UTC](https://www.ruby-forum.com/t/trouble-running-rubyscript2exe-for-compiling-my-code/149300/1 "2008-09-23T12:49:09Z")

</div>

All,  
I am getting the following error while to execute the  
rubyscript2exe :  
have the following on my system:  
1)ruby  
2)gem installed rubyscript2exe  
Have i missed out on anything else?

I get the below mentioned error while running the following command :  
command:- D:\ruby rubyscript2exe test.rb

D:/RUBY/lib/ruby/site\_ruby/1.8/rubygems/remote\_fetcher.rb:19:  
uninitialized constant Gem::Excep  
tion (NameError)  
from  
D:/RUBY/lib/ruby/site\_ruby/1.8/rubygems/spec\_fetcher.rb:4:in `require' from D:/RUBY/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:4 from D:/RUBY/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:10:in`require’  
from D:/RUBY/lib/ruby/site\_ruby/1.8/rubygems/source\_index.rb:10  
from D:/RUBY/lib/ruby/site\_ruby/1.8/rubygems.rb:767:in `require' from D:/RUBY/lib/ruby/site_ruby/1.8/rubygems.rb:767 from D:/RUBY/lib/ruby/site_ruby/1.8/rubygems/exceptions.rb:1:in`require’  
from D:/RUBY/lib/ruby/site\_ruby/1.8/rubygems/exceptions.rb:1  
Couldn’t execute this command (rc=256):

Cheers  
shekar

---

<div class="post-metadata">

**Author:** ![rubist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c67d28/32.png) [@rubist](https://www.ruby-forum.com/u/rubist)\
**Post date:** [September 23, 2008, 1:30pm UTC](https://www.ruby-forum.com/t/trouble-running-rubyscript2exe-for-compiling-my-code/149300/2 "2008-09-23T13:30:30Z")

</div>

> I am getting the following error while to execute the  
> rubyscript2exe: have the following on my system:
> 
> 1)ruby  
> 2)gem installed rubyscript2exe
> 
> Have i missed out on anything else?

Yep. You missed a couple of threads where this issue has been  
discussed before… :}

This one, for example:  
[https://groups.google.com/group/ruby-talk-google/browse\_frm/thread/f922ec9ef52af7e4?tvc=1](https://groups.google.com/group/ruby-talk-google/browse_frm/thread/f922ec9ef52af7e4?tvc=1)

gegroet,  
Erik V. - [http://www.erikveen.dds.nl/](http://www.erikveen.dds.nl/)

---

<div class="post-metadata">

**Author:** ![rubist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c67d28/32.png) [@rubist](https://www.ruby-forum.com/u/rubist)\
**Post date:** [September 23, 2008, 7:22pm UTC](https://www.ruby-forum.com/t/trouble-running-rubyscript2exe-for-compiling-my-code/149300/3 "2008-09-23T19:22:54Z")

</div>

Erik V. wrote:

> > I am getting the following error while to execute the  
> > rubyscript2exe: have the following on my system:
> > 
> > 1)ruby  
> > 2)gem installed rubyscript2exe
> > 
> > Have i missed out on anything else?
> 
> Yep. You missed a couple of threads where this issue has been  
> discussed before… :}
> 
> This one, for example:  
> [https://groups.google.com/group/ruby-talk-google/browse\_frm/thread/f922ec9ef52af7e4?tvc=1](https://groups.google.com/group/ruby-talk-google/browse_frm/thread/f922ec9ef52af7e4?tvc=1)
> 
> gegroet,  
> Erik V. - [http://www.erikveen.dds.nl/](http://www.erikveen.dds.nl/)  
> ==================================================================================  
> Thanks for your timely Reply, I went through some of those threads which  
> discussed about the similar issue to mine.  
> I still face the same issue, as there is no proper final fix explained,  
> it only talks about workarounds involved which isn’t working for me.  
> “unset RUBYOPT” doesn’t work for me, which was mentioned as one of the  
> workarounds…as i get this error  
> “‘unset’ is not recognized as an internal or external command,  
> operable program or batch file.”

Hope I find it working ASAP 🙂

Cheers

---

<div class="post-metadata">

**Author:** ![rubist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c67d28/32.png) [@rubist](https://www.ruby-forum.com/u/rubist)\
**Post date:** [September 24, 2008, 11:48am UTC](https://www.ruby-forum.com/t/trouble-running-rubyscript2exe-for-compiling-my-code/149300/4 "2008-09-24T11:48:36Z")

</div>

Erik V. wrote:

> > “unset RUBYOPT” doesn’t work for me, which was mentioned as one of the  
> > workarounds…as i get this error
> 
> Does unsetting RUBYOPT work, even if “unset RUBYOPT” doens’t work?  
> Maybe something like “set RUYBOPT=”? Just guessing. I can’t check,  
> since there’s no Windows machine around.
> 
> gegroet,  
> Erik V.  
> =================================================================  
> Thanks Erik, I was able to successfully run rubyscript2exe with a sample  
> ruby program, it works great!!  
> Now the real test comes for me, as i am using Selenium Automation tool &  
> bunch of ruby scripts for my Test Automation,  
> I tried building it, it looks like selenium server, and other dependent  
> files are not getting bundled into the package!!  
> Any idea on this…if anyone has worked on the similar lines…  
> Whether it’s feasible to do something like this!!

Cheers  
Shekar

---

<div class="post-metadata">

**Author:** ![rubist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c67d28/32.png) [@rubist](https://www.ruby-forum.com/u/rubist)\
**Post date:** [September 24, 2008, 10:23am UTC](https://www.ruby-forum.com/t/trouble-running-rubyscript2exe-for-compiling-my-code/149300/5 "2008-09-24T10:23:47Z")

</div>

> “unset RUBYOPT” doesn’t work for me, which was mentioned as one of the  
> workarounds…as i get this error

Does unsetting RUBYOPT work, even if “unset RUBYOPT” doens’t work?  
Maybe something like “set RUYBOPT=”? Just guessing. I can’t check,  
since there’s no Windows machine around.

gegroet,  
Erik V.
