Dany
Dany

Reputation: 41

No such file or directory in VScode

Does anyone has a solution for this error?´

dan@LAPTOP-U61VD2F3:/mnt/c/Users/danyl/Desktop/New folder$ ruby "c:\Users\danyl\Desktop\New folder\Lesson.rb"     
Traceback (most recent call last):
ruby: No such file or directory -- c:\\Users\\danyl\\Desktop\\New folder\\Lesson.rb (LoadError)
dan@LAPTOP-U61VD2F3:/mnt/c/Users/danyl/Desktop/New folder$

Upvotes: 0

Views: 13276

Answers (2)

Hal
Hal

Reputation: 1

Solution in this case:

Go to your settings.json file in Vscode and add this line into the settings:

"code-runner.terminalRoot": "/",

or you can open settings and find Code-runner: Terminal Root and type this:

/

Upvotes: 0

Dany
Dany

Reputation: 41

Solution in this case:

Go to your settings.json file in Vscode and add this line into the settings:

"code-runner.terminalRoot": "/mnt/",

or you can open settings and find Code-runner: Terminal Root and type this:

/mnt/

Note: For Windows system, replaces the Windows style drive letter in the command with a Unix style root when using a custom shell as the terminal, like Bash or Cgywin. Example: Setting this to '/mnt/' will replace 'C:\path' with '/mnt/c/path'

Upvotes: 2

Related Questions