t

Windows Error: "whoami"

Asked by Chris

Running CoreServer on a Windows installation of Ruby gives me some error about `whoami` not being a recognized command! I can't run CS!

Question information

Language:
English Edit question
Status:
Solved
For:
t Edit question
Assignee:
No assignee Edit question
Solved by:
Chris
Solved:
Last query:
Last reply:
Revision history for this message
Chris (kidko) said :
#1

The "whoami" command is a *NIX (inc. Linux) command that returns the username of the person running CoreServer. CS requires full admin access to run, and so checks to see if the user is the admin, named "root." It's to ensure that the server runs without problems.

But on Windows, this doesn't need to happen. There are no such permissions. Not to mention the fact that "whoami" isn't a command! Windows throws an error at this and crashes the server script.

Until a fix is installed in the code itself, Windows users need to do the following:
* Find the line that reads: me = `whoami`.chop; (no semicolon) In 0.5.5, this is line 131
* Delete it and the next four lines, or comment them out. So, you should have deleted/commented lines 131-135 (up to the first "end," inclusive)

After that, CS should run.