[Note] A list of commands that I checked many times after trying Ruby.

Introduction

I've been touching Ruby for about half a year, and here are some commands that I often looked up. Since it is a beginner and first post, it would be encouraging if you could give us feedback in the comments and LGTM. Thank you.

Ruby related

Check the version of ruby
$ ruby -v

Check rails version
$ rails -v

credentials.yml.open enc file
$ EDITOR='code --wait' rails credentials:edit
(* To open a file with vscode, you need to install shell so that you can use the code command.)

unicorn related

Check the startup status
$ ps auxwww | grep unicorn

End the process
$ kill -9 ○○○○○○

Check all logs($ cd /var/www/app/at log)
$ less unicorn.staderr.log

Check the latest 10 logs($ cd /var/www/app/at log)
$ tail unicorn.staderr.log

nginx related

restart
$ sudo service nginx restart

Check all logs(In the home directory of the production environment)
$ sudo less /var/log/nginx/error.log

MySQL related

Check the startup status
$ sudo service mysqld status

to start
$ sudo service mysqld start

Capistrano related

Deploy execution
$ bundle exec cap production deploy

Roll back to the previous state
$ bundle exec cap production deploy:rollback

There are only commands around the production environment, but if there are excesses or deficiencies, we will update them as needed.

Recommended Posts

[Note] A list of commands that I checked many times after trying Ruby.
[Ruby] List of basic commands
List of Docker commands that I often use (container operation)
A note that I had trouble when trying to use nginx with Remote-Containers of vscode
Make a note of Ruby keyword arguments
A note that I gave up trying to make a custom annotation for Lombok
A collection of RSpecs that I used frequently
I checked the number of taxis with Ruby
[Ruby] I want to make a program that displays today's day of the week!
List of things I used without understanding well: Ruby
[Rails] Volume that displays favorites and a list of favorites
A collection of commands that were frequently used on heroku
Determine that the value is a multiple of 〇 in Ruby
A note about the seed function of Ruby on Rails
I tried JAX-RS and made a note of the procedure
A program that counts the number of words in a List