
The Ruby On Rails app, which was running normally until yesterday, until mid-morning, and just a while ago, suddenly got "Routing Error: Uninitialized constant XXXXX...

Happy New Year everyone. Well, I think I'll start my first post in 2015 with the hottest Ruby story right now. ...

On the application side, there are times when you want to check the current health status of any AWS EC2 instance in real time. For example, when starting or stopping an EC2 instance from an external application, this is the case where you want to check the operation status of the instance and run the next process when the status changes. SDK for...

When I was writing a task in Capistrano3, I had a hard time obtaining the top-level task name because I had a hard time obtaining the top-level task name because I had a hard time subtracting the name of the top-level task executed as a cap command in the task. Basically, if you want to get your task name in a task in Capistrano3, you can draw it as an argument to the block as follows: ``` desc "main task" task...

When processing Ruby + MySQL, I think there are many cases where 'ruby-mysql' or 'mysql2' is used in the MySQL operation system libraries, but since it was necessary to perform MySQL query operations in a raw Ruby environment without these libraries, I tried to generalize the source I wrote at that time and summarize it. Well... There may be almost no need, but I thought I'd share it as TIPS. ...

So far, we have created a new AWS EC2 instance and made it a task in Capistrano 3 up to the initial configuration for that instance. Although it was difficult, we finally got to the point where the EC2 instance was ready and all we had to do was install the middleware and applications. Therefore, this time, I would like to summarize the deployment flow so far. ...

If you run a task to SSH access a newly created EC2 instance in Capistrano without fully upping it, the task will not complete with an error somewhere. Therefore, we created a task that checks the startup status of the EC2 instance to be deployed, and if it is not fully launched, it sleeps and waits for startup. ...

In this section, we will create tasks to initialize the server environment, such as creating a maintenance user, setting a password for the initial user, and setting the hostname of the server when logging in to a newly created EC2 instance in Capistrano for the first time via SSH. ...

Continuing from last time, let's SSH in to the newly created EC2 instance in Capistrano. First, AWS creates a key pair for the new instance. From the EC2 menu in the AWS Management Console, select Key...

The newly created EC2 instance in the previous deployment configuration file did not have a key pair, security group, etc., so I couldn't SSH access the created instance as it was... 1orz After that, I modified various deployment settings and was able to log in to the EC2 instance I created with SSH, so I wrote a memorandum about how it happened. ...

Last time, > Next time, I'm going to try to create a database and insert the initial settings as a last-minute task, then rewrite the WordPress configuration file and download the WordPress theme from GitHub. However, due to my convenience, I used Capistrano3 to create an AWS EC2 instance, so I would like to leave the TIPS. ...

I have used Capistrano3 to deploy the latest version of WordPress on my own host, so I will keep a log of the steps and advance my understanding of the deployment tool "Capistrano". ...