[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby2exe

Junkone

9/19/2008 9:33:00 PM

i get a error i dont understand. pl help
E:\TradingTools\Development\app\helpers>rubyscript2exe sendIM.rb
Tracing sendIM ...
e:/ruby/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:19:
uninitialized constant Gem::Exception (NameError)
from e:/ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:
4:in `require'
from e:/ruby/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:4
from e:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:
10:in `require'
from e:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:
10
from e:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:767:in
`require'
from e:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:767
from e:/ruby/lib/ruby/site_ruby/1.8/rubygems/exceptions.rb:
1:in `require'
from e:/ruby/lib/ruby/site_ruby/1.8/rubygems/exceptions.rb:1
Couldn't execute this command (rc=256):
e:\ruby\bin\ruby -r 'rubygems/rubygems_version.rb' -r 'rubygems/
defaults.rb' -r 'thread.so' -r 'thread.rb' -r 'rbconfig.rb' -r
'rubygems/exceptions.rb' -r 'rubygems/requirement.rb' -r 'rubygems/
version.rb' -r 'rubygems/dependency.rb' -r 'rubygems/
gem_path_searcher.rb' -r 'rubygems/user_interaction.rb' -r 'rubygems/
platform.rb' -r 'rubygems/specification.rb'
-r 'zlib.so' -r 'socket.so' -r 'timeout.rb' -r 'net/protocol.rb' -r
'uri/common.rb' -r 'uri/generic.rb' -r 'uri/ftp.rb' -r 'uri/http.rb' -
r 'uri/https.rb' -r 'uri/ldap.rb' -r 'uri/mailto.rb' -r 'uri.rb' -r
'net/http.rb' -r 'stringio.so' -r 'rubygems/remote_fetcher.rb' -r
'rubygems/spec_fetcher.rb' -r 'rubygems/source_index.rb' -r 'rubygems/
builder.rb' -r 'rubygems/custom_require.rb' -r 'rubygems.rb' -r
'ubygems.rb' -r 'etc.so' -r 'fileutils.rb' -I
6 Answers

James Dinkel

9/20/2008 5:25:00 AM

0

rubyscript2exe has problems with rubygems 1.2.0. You'll need to
downgrade to rubygems 1.1.1.

James
--
Posted via http://www.ruby-....

Erik Veenstra

9/20/2008 9:43:00 AM

0

Junkone

9/20/2008 3:48:00 PM

0

On Sep 20, 5:42 am, Erik Veenstra <erikv...@gmail.com> wrote:
> > You'll need to downgrade to rubygems 1.1.1.
>
> You don't have to. This topic has been discussed before:
>
> https://groups.google.com/group/ruby-talk-google/tree/brows......
>
> gegroet,
> Erik V.

i tried this
E:\TradingTools\Development\app\helpers>unset RUBYOPT
'unset' is not recognized as an internal or external command,
operable program or batch file.


but unset does not work in my machine. infact in that thread, the last
note is that thread seems that the issue is unresolved. are there any
more suggestions or i have to downgrade....

Axel

9/21/2008 9:03:00 AM

0

Hello,

I had the same problem two weeks ago and managed to solve it with the
following .bat file.
(The bat file starts rubyscript2exe.)


Short version:

<snip>
set rubyopt=
:: begin long line
ruby C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
\rubyscript2exe diashow.rb --rubyscript2exe-verbose
:: end long line
set rubyopt=-rubygems
pause
</snip>

Replace
C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
\rubyscript2exe
by your absolute path to your rubyscript2exe

Replace
diashow.rb
by the path to your ruby file you want to convert into an exe.



Long version:
<snip>
@echo off
cd
:: Setting working dir to the dir of this .bat file:
cd %0\..

if "%OS%"=="Windows_NT" ((cd /d %~dp0)&(goto next))
echo %0 | find.exe ":" >nul
if not errorlevel 1 %0cd %0\..
:next
echo Working dir:
cd

set rubyopt=
:: begin long line
ruby C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
\rubyscript2exe diashow.rb --rubyscript2exe-verbose
:: end long line
set rubyopt=-rubygems
pause
</snip>

Replace
C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
\rubyscript2exe
by your absolute path to your rubyscript2exe

Replace
diashow.rb
by the path to your ruby file you want to convert into an exe.


I'm using:
- gem 1.2.0
- rubyscript2exe-0.5.3
- ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
- Windows XP Home, running with administratory rights (right English
wording?)


Please let me know if this works for you, too.

Have a nice day,

Axel

rpminihan

9/22/2008 4:46:00 AM

0

On Sep 21, 2:03 am, Axel <a99.googlegroups....@dfgh.net> wrote:
> Hello,
>
> I had the same problem two weeks ago and managed to solve it with the
> following .bat file.
> (The bat file starts rubyscript2exe.)
>
> Short version:
>
> <snip>
> set rubyopt=
> :: begin long line
> ruby  C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe  diashow.rb --rubyscript2exe-verbose
> :: end long line
> set rubyopt=-rubygems
> pause
> </snip>
>
> Replace
>   C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe
> by your absolute path to your rubyscript2exe
>
> Replace
>   diashow.rb
> by the path to your ruby file you want to convert into an exe.
>
> Long version:
> <snip>
> @echo off
> cd
> :: Setting working dir to the dir of this .bat file:
> cd %0\..
>
> if "%OS%"=="Windows_NT" ((cd /d %~dp0)&(goto next))
> echo %0 | find.exe ":" >nul
> if not errorlevel 1 %0> cd %0\..
> :next
> echo Working dir:
> cd
>
> set rubyopt=
> :: begin long line
> ruby  C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe  diashow.rb --rubyscript2exe-verbose
> :: end long line
> set rubyopt=-rubygems
> pause
> </snip>
>
> Replace
>   C:\ruby\lib\ruby\gems\1.8\gems\rubyscript2exe-0.5.3\bin
> \rubyscript2exe
> by your absolute path to your rubyscript2exe
>
> Replace
>   diashow.rb
> by the path to your ruby file you want to convert into an exe.
>
> I'm using:
> - gem 1.2.0
> - rubyscript2exe-0.5.3
> - ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
> - Windows XP Home, running with administratory rights (right English
> wording?)
>
> Please let me know if this works for you, too.
>
> Have a nice day,
>
> Axel

One little change. ruby C:\ruby\lib\ruby\gems\1.8\gems
\rubyscript2exe-0.5.3\bin\rubyscript2exe %1
--rubyscript2exe-verbose

%1 in the command line allows you to specify the path+filename of the
ruby program on the command line. Makes your script a little more
generic.

Ryan

Axel

9/22/2008 6:50:00 AM

0

You're right. Thank you!

Axel