[LINUX] Ruby on Windows Clear file management that is difficult to understand

File management that is confusing with Ruby
When you can write a program and save it, but you can not import the file,

1. Save programming

This time, as an example, consider Hello Ruby and a program that returns a message. Enter the following program with TeraPad and

kensyuu15.rb


 Save as file name

~~~
print("Hello, Ruby.\n")
~~~

 At this time, make sure you know exactly where you saved it.
 It is an image that guides the way to the created file to a personal computer.

 I saved it in a file called 20191219 in a file called Folder1 on my desktop.

## 2. Teach your PC the way to the saved file

 Start Ruby.
 Guide the desired file to your PC.

 For the guidance method, write the places in order and separate them with /.
 Add a cd at the beginning to mean go to that place

~~~
cd /mnt/c/Users/aiko/Desktop/Folder1/20191219
~~~

 The above is when a user named aiko saves it in a file called 20191219 in a file called Folder1 on the desktop.

 Then execute ls which means to see the contents

~~~
ls
~~~

 With this, if the contents of 20191219 are displayed, it is OK

## 3. Run

~~~
Ruby kensyuu15.rb
~~~

 ↓ Result
 ![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/551646/ef0aab17-0947-21f3-d1d8-f7e99f051b26.png)



Recommended Posts

Ruby on Windows Clear file management that is difficult to understand
Binary tree traverse is difficult to understand
The .pyd file is the DLL itself on Windows
I tried to create a server environment that runs on Windows 10
Normalize the file that converted Excel to csv as it is.
Golang is difficult to translate. .. .. (Part 1)
Python 3.6 on Windows ... and to Xamarin.
How to use Dataiku on Windows
How to install pycrypto on Windows
How to deploy django-compressor on Windows
Python CGI file created on Windows
How to install music 21 on windows