[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

win32 Ruby woes... pleas help

Peter Szinek

2/3/2007 4:15:00 PM

Hi all,


I am going to release my first Ruby package in a few hours and I wanted
to check if the unit tests run under Win32 (I am using linux exclusively
for the 5th or so year now, so I even had to google how to add
c:\ruby\bin to the path :-) - i.e. I can be considered a total newbie on
win32)

I have installed the latest one-click windows installer. Everything
looks fine, except that rake crashes the whole console (i.e. I open a
console by running cmd, type rake there, and regardless if there is a
Rakefile or not, rake outputs some message which I can not read because
the console is closed).

What I am doing wrong?

TIA,
Peter

__
http://www.rubyra...

7 Answers

Dejan Dimic

2/3/2007 5:43:00 PM

0

You should be a little bit more precise. Like this, I can not give any
clue. I use ruby on XP and Ubuntu. Even if there is no rakefile the
rake does not produce vanishing of the command console just the error
message that no rakefile find.

If I can I will gladly help you.

Dejan

On Feb 3, 5:14 pm, Peter Szinek <p...@rubyrailways.com> wrote:
> Hi all,
>
> I am going to release my first Ruby package in a few hours and I wanted
> to check if the unit tests run under Win32 (I am using linux exclusively
> for the 5th or so year now, so I even had to google how to add
> c:\ruby\bin to the path :-) - i.e. I can be considered a total newbie on
> win32)
>
> I have installed the latest one-click windows installer. Everything
> looks fine, except that rake crashes the whole console (i.e. I open a
> console by running cmd, type rake there, and regardless if there is a
> Rakefile or not, rake outputs some message which I can not read because
> the console is closed).
>
> What I am doing wrong?
>
> TIA,
> Peter
>
> __http://www.rubyra...


Chris Shea

2/3/2007 5:47:00 PM

0

On Feb 3, 9:14 am, Peter Szinek <p...@rubyrailways.com> wrote:
> Hi all,
>
> I am going to release my first Ruby package in a few hours and I wanted
> to check if the unit tests run under Win32 (I am using linux exclusively
> for the 5th or so year now, so I even had to google how to add
> c:\ruby\bin to the path :-) - i.e. I can be considered a total newbie on
> win32)
>
> I have installed the latest one-click windows installer. Everything
> looks fine, except that rake crashes the whole console (i.e. I open a
> console by running cmd, type rake there, and regardless if there is a
> Rakefile or not, rake outputs some message which I can not read because
> the console is closed).
>
> What I am doing wrong?
>
> TIA,
> Peter
>
> __http://www.rubyra...

Can you try sending the output to a file?

rake > crash.txt

Peter Szinek

2/3/2007 6:28:00 PM

0

Dejan, Chris,

the problem is that I did not notice anything unusual. Even the unit
tests run.

I have redirected rake > crash.txt as Chris suggested. The file contained:

=====================================================================
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
Rakefile.rb)
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1822:in
`load_rakefile'
(See full trace by running task with --trace)
=====================================================================

when there was no Rakefile, and this:

=====================================================================
(in C:/ruby/lib/ruby/gems/1.8/gems/scrubyt-0.2.0)
Loaded suite
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader
Started

Finished in 0.609 seconds.

17 tests, 148 assertions, 0 failures, 0 errors
=====================================================================

i.e. everything runs as it would under Ubuntu, the only difference is
that the console is closed after rake finishes...

Any ideas?
Dejan, I have no idea how could I be more specific... this is all what
happens, what should I add? I am on WinXP (+SP2), I have developed the
stuff under Ubuntu and there everything worked fine. Here on win I just
installed the one-click installer and that was it.
Strange.

Cheers,
Peter

__
http://www.rubyra...




Chris Shea

2/3/2007 7:08:00 PM

0

On Feb 3, 11:28 am, Peter Szinek <p...@rubyrailways.com> wrote:
> Dejan, Chris,
>
> the problem is that I did not notice anything unusual. Even the unit
> tests run.
>
> I have redirected rake > crash.txt as Chris suggested. The file contained:
>
> =====================================================================
> rake aborted!
> No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
> Rakefile.rb)
> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1822:in
> `load_rakefile'
> (See full trace by running task with --trace)
> =====================================================================
>
> when there was no Rakefile, and this:
>
> =====================================================================
> (in C:/ruby/lib/ruby/gems/1.8/gems/scrubyt-0.2.0)
> Loaded suite
> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader
> Started
>
> Finished in 0.609 seconds.
>
> 17 tests, 148 assertions, 0 failures, 0 errors
> =====================================================================
>
> i.e. everything runs as it would under Ubuntu, the only difference is
> that the console is closed after rake finishes...
>
> Any ideas?
> Dejan, I have no idea how could I be more specific... this is all what
> happens, what should I add? I am on WinXP (+SP2), I have developed the
> stuff under Ubuntu and there everything worked fine. Here on win I just
> installed the one-click installer and that was it.
> Strange.
>
> Cheers,
> Peter
>
> __http://www.rubyra...

I have no idea if this will work, but how about trying running it in a
console inside another console. i.e. Start -> Run... -> cmd and then
run cmd in that console. If you do that, you have to "exit" twice
before you can get out. Maybe it'll only crash the inner console and
there'll be extra output. Just a guess.

Also, I'd be happy to give it a shot on my machines.

Chris

Jano Svitok

2/3/2007 7:34:00 PM

0

On 2/3/07, Peter Szinek <peter@rubyrailways.com> wrote:
> Dejan, Chris,
>
> the problem is that I did not notice anything unusual. Even the unit
> tests run.
>
> I have redirected rake > crash.txt as Chris suggested. The file contained:
>
> =====================================================================
> rake aborted!
> No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb,
> Rakefile.rb)
> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1822:in
> `load_rakefile'
> (See full trace by running task with --trace)
> =====================================================================
>
> when there was no Rakefile, and this:
>
> =====================================================================
> (in C:/ruby/lib/ruby/gems/1.8/gems/scrubyt-0.2.0)
> Loaded suite
> c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake/rake_test_loader
> Started
>
> Finished in 0.609 seconds.
>
> 17 tests, 148 assertions, 0 failures, 0 errors
> =====================================================================
>
> i.e. everything runs as it would under Ubuntu, the only difference is
> that the console is closed after rake finishes...
>
> Any ideas?
> Dejan, I have no idea how could I be more specific... this is all what
> happens, what should I add? I am on WinXP (+SP2), I have developed the
> stuff under Ubuntu and there everything worked fine. Here on win I just
> installed the one-click installer and that was it.
> Strange.
>
> Cheers,
> Peter

This seems related:
http://rubyforge.org/tracker/index.php?func=detail&aid=8325&group_id=167&am...

J.

Peter Szinek

2/3/2007 7:44:00 PM

0

> This seems related:
> http://rubyforge.org/tracker/index.php?func=detail&aid=8325&group_id=167&am...
Vdaka ti, dobra vila! :-)

Yup, this was exactly it! Does anybody have any idea why does rake.bat
have 'exit %ERRORLEVEL%' at the end? Of course that line closes the
console...

Thanks to everyone!
Peter

__
http://www.rubyra...

Joe Swatosh

2/4/2007 12:32:00 AM

0

On 2/3/07, Peter Szinek <peter@rubyrailways.com> wrote:
> > This seems related:
> > http://rubyforge.org/tracker/index.php?func=detail&aid=8325&group_id=167&am...
> Vdaka ti, dobra vila! :-)
>
> Yup, this was exactly it! Does anybody have any idea why does rake.bat
> have 'exit %ERRORLEVEL%' at the end? Of course that line closes the
> console...
>
> Thanks to everyone!
> Peter
>
> __
> http://www.rubyra...
>
>

I believe the idea is to pass the %ERRORLEVEL% on to an invoking
process. Change the 'exit %ERRORLEVEL%' to 'exit /b %ERRORLEVEL%' and
give it a whirl.
--
Joe Swatosh