I am using the Linux subsystem with the Ubuntu distribution for Windows 10 to compile crystal code. I have created a directory which contains a text file called Hello.cr
and placed inside of it puts "Hello World"
. I compile and run using crystal Hello.cr
and expected to get to my bash terminal the old greeting Hello World
. Instead, I get no error but also no output. crystal run Hello.cr
fairs no better. What am I doing wrong here? As an added piece of information, I am using an integrated terminal inside of VS Code.
Asked
Active
Viewed 182 times
0

Shadow43375
- 514
- 7
- 20
-
2Please [edit] your question and post your complete `Hello.cr`. Also, does `crystal eval 'puts("hello world")'` work as expected (i.e. print "hello world") ? – Frank Schmitt Jul 21 '18 at 09:13
-
@FrankSchmitt `crystal eval 'puts("hello world")'` does work as expected and prints out "hello world" to the terminal. I did not include any more info about `Hello.cr` because that's literally all the file does--print hello world. It's just a test of my setup. – Shadow43375 Jul 21 '18 at 11:21
-
Are you running the latest version of Windows 10 and WSL? If not, you might be running into the bug described here : https://askubuntu.com/a/935878 – Frank Schmitt Jul 22 '18 at 14:02
-
1I cannot reproduce this - Windows 10 with Ubuntu, installed crystal as decribed on the homepage (added apt repo + `sudo apt install crystal`), and it works as expected. Please add more information about which version of Crystal (did you use the Windows installer? Or did you use `apt install crystal`´?) and which versions of Windows and WSL you're running (see my previous comment). – Frank Schmitt Jul 26 '18 at 10:57
-
1exact file and exact command lines used pleae... – rogerdpack Aug 03 '18 at 15:13