win32 Ruby woes... pleas help

P

Peter Szinek

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.rubyrailways.com
 
D

dima

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
 
C

Chris Shea

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.rubyrailways.com

Can you try sending the output to a file?

rake > crash.txt
 
P

Peter Szinek

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.rubyrailways.com
 
C

Chris Shea

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.rubyrailways.com

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
 
J

Jan Svitok

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&atid=715

J.
 
J

Joe Swatosh

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.rubyrailways.com

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top