Basics of Ruby

Nice to meet you. This is Takumi. I started to improve my output as an engineer. Thank you.

What is Ruby? Before that, here you will learn what programming is in the first place and the meaning of basic terms.

programming Data that summarizes the processing procedures performed by a computer is called a program. The work of creating and writing this program is called programming.

Programming language The language used for programming. On the other hand, the language we humans use in everyday conversation is called natural language.

Natural languages such as Japanese and English are for humans to communicate with each other. A programming language is a language for humans to ask a computer to process.

Ruby (programming language) Ruby is one of the programming languages. Since the description is simple and easy to understand, it is easy and fun to program, and it is practical. You can create a variety of software, from large web applications to small programs.

→ Ruby official website

Ruby program execution procedure

  1. Create a file
  2. Write the program in a file
  3. Execute the program by specifying the file

To output Hello World with ruby, write like this in VScode.


1 puts "Hello World"

In the terminal, write like this.

#Check the current directory
% pwd

#Check the contents of the directory
% ls

#Run Ruby file
% ruby helloworld.rb

The following is the executed screen.

[email protected] ~ % cd ruby
[email protected] ruby % pwd
[email protected] ruby % ls
[email protected] ruby % ruby helloworld.rb
Hello World

that's all. We will continue to do so! Thank you for reading.

Recommended Posts

Basics of Ruby
Ruby basics
Ruby basics
Ruby basics
Basics of sending Gmail in Ruby
Basics of Ruby ~ Review of confusing parts ~
Ruby Basics 2 ~ Review of confusing parts ~
[Ruby] Exception handling basics
Ruby on Rails basics
definition of ruby method
Basics of try-with-resources statement
[Ruby] Summary of class definitions. Master the basics.
Ruby on Rails ~ Basics of MVC and Router ~
Basic methods of Ruby hashes
[Rails] Introduction of devise Basics
Basic methods of Ruby arrays
[GCD] Basics of DispatchQueue class
Basics of character operation (java)
[Ruby] Various types of each
Understand the basics of docker
The basics of Swift's TableView
Summary of Java language basics
[Ruby] List of basic commands
[Ruby] Class nesting, inheritance, and the basics of self
Judgment of fractions in Ruby
Review of Ruby basic grammar
About the behavior of ruby Hash # ==
Basics of conditional branching and return
Implementation of ls command in Ruby
Extraction of "ruby" double hash * Review
[Ruby] See the essence of ArgumentError
Basic knowledge of Ruby on Rails
The basics of SpringBoot + MyBatis + MySQL
[Ruby basics] split method and to_s method
[Ruby] Date, Time, Datetime class basics
Ruby 5 or higher sum of integers
Ruby / Rust linkage (6) Extraction of morphemes
Impressions of making BlackJack-cli with Ruby
Ruby memorandum (acquisition of key value)
[Ruby] Review about nesting of each
Explanation about Array object of Ruby
[Ruby] Display the contents of variables
[Ruby on Rails] Introduction of initial data
Gem list of each ruby version 2.5.x
Ruby learning 4
Make a note of Ruby keyword arguments
[Rails] Addition of Ruby On Rails comment function
[Ruby] Array
Ruby learning 5
Understand the basics of Android Audio Record
Acquisition of article information in ruby ​​scraping
Dharma doll drop of characters (ruby edition)
Memorandum of new graduate SES [Java basics]
Fragment basics
[Ruby basics] Methods that frequently use blocks
Refactoring Ruby
JPA Basics 1
[GCD] Basics of parallel programming in Swift
[Ruby] From the basics to the inject method
Let's summarize "MVC" of Ruby on Rails
Now, I've summarized the basics of RecyclerView