I am getting the following error when i created an exe from a ruby
script. Has any got any idea why this comes?
Thanks,
Rakesh
C:/Users/Pi/eee/eee.livequote1.exe.3/lib/rubygems/custom_require.rb:27:in
gem_o riginal_require': no such file to load -- tempfile (LoadError) from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/rubygems/custom_require.rb :27:in
require’
from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/open-uri.rb:302:in
<<' from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/open-uri.rb:259:in
open_h
ttp’
from
C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/protocol.rb:381:in ca ll_block' from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/protocol.rb:372:in
<<
’
from
C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/protocol.rb:88:in rea d' from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/http.rb:2221:in
read_
body_0’
from
C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/http.rb:2182:in read_ body' ... 16 levels... from C:\Users\Pi\eee\eee.livequote1.exe.3\app\livequote1.rb:61:in
each’
from C:\Users\Pi\eee\eee.livequote1.exe.3\app\livequote1.rb:61
from C:\Users\Pi\eee\eee.livequote1.exe.3\bootstrap.rb:77:in
`load’
from C:\Users\Pi\eee\eee.livequote1.exe.3\bootstrap.rb:77
-------- Original-Nachricht --------
Datum: Wed, 3 Sep 2008 16:30:00 +0900
Von: Rakesh P. [email protected]
An: [email protected]
Betreff: Error when running an exe created with rubyscript2exe
from
from
body’
… 16 levels…
from
C:\Users\Pi\eee\eee.livequote1.exe.3\app\livequote1.rb:61:in `each’
from C:\Users\Pi\eee\eee.livequote1.exe.3\app\livequote1.rb:61
from C:\Users\Pi\eee\eee.livequote1.exe.3\bootstrap.rb:77:in
`load’
from C:\Users\Pi\eee\eee.livequote1.exe.3\bootstrap.rb:77
Posted via http://www.ruby-forum.com/.
Dear Rakesh,
the script you are executing cannot find a gem or a file “tempfile”.
This might be because the latter is not there, or cannot be found ( due
to a path
issue).
Best regards,
Axel
Rakesh P. wrote:
I am getting the following error when i created an exe from a ruby
script. Has any got any idea why this comes?
Thanks,
Rakesh
C:/Users/Pi/eee/eee.livequote1.exe.3/lib/rubygems/custom_require.rb:27:in
gem_o riginal_require': no such file to load -- tempfile (LoadError) from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/rubygems/custom_require.rb :27:in
require’
from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/open-uri.rb:302:in
<<' from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/open-uri.rb:259:in
open_h
ttp’
from
C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/protocol.rb:381:in ca ll_block' from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/protocol.rb:372:in
<<
’
from
C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/protocol.rb:88:in rea d' from C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/http.rb:2221:in
read_
body_0’
from
C:/Users/Pi/eee/eee.livequote1.exe.3/lib/net/http.rb:2182:in read_ body' ... 16 levels... from C:\Users\Pi\eee\eee.livequote1.exe.3\app\livequote1.rb:61:in
each’
from C:\Users\Pi\eee\eee.livequote1.exe.3\app\livequote1.rb:61
from C:\Users\Pi\eee\eee.livequote1.exe.3\bootstrap.rb:77:in
`load’
from C:\Users\Pi\eee\eee.livequote1.exe.3\bootstrap.rb:77
You need to “require” any gem that are required by a gem that you did
required.
For example: watir requires win32ole and activesupport
normally you would not specifically require win32ole and activesupport
but you do if you want to create an “exec” program with rubyscript2exe
Hope that helps
Erik V. wrote:
RubyScript2Exe and RubyGems 1.2.0 don’t play very well together:
http://groups.google.com/group/ruby-talk-google/browse_frm/thread/f922ec9ef52af7e4
http://rubyforge.org//tracker/index.php?func=detail&aid=21467&group_id=126&atid=575
Add “require ‘rubygems’” in your application and temporarily
remove rubygems from RUBYOPT before compiling:
$ RUBYOPT= ruby rubyscript2exe.rb test.rb
Or:
C:> unset RUBYOPT
C:> ruby rubyscript2exe.rb test.rb
That seems to work. At least, on my machine…
gegroet,
Erik V. - http://www.erikveen.dds.nl/
Thanks for the help guys.
It seems there is some problem with RubyScript2Exe as Erik mentioed. I
am still getting ther error when i create the exe with the command “ruby
rubyscript2exe.rb test.rb”. But when i installed gem install
rubyscript2exe.rb and then converted it to exe by giving ‘rubyscript2exe
test.rb’ the exe is working properly. I am kind of novice in ruby, so
not sure if i missed anything trivial earlier .
Best Regards,
Rakesh
RubyScript2Exe and RubyGems 1.2.0 don’t play very well together:
http://groups.google.com/group/ruby-talk-google/browse_frm/thread/f922ec9ef52af7e4
http://rubyforge.org//tracker/index.php?func=detail&aid=21467&group_id=126&atid=575
Add “require ‘rubygems’” in your application and temporarily
remove rubygems from RUBYOPT before compiling:
$ RUBYOPT= ruby rubyscript2exe.rb test.rb
Or:
C:> unset RUBYOPT
C:> ruby rubyscript2exe.rb test.rb
That seems to work. At least, on my machine…
gegroet,
Erik V. - http://www.erikveen.dds.nl/