詳細検索

ruby


No matter what I do in Rails, when I feel like crying when I am told Routing Error uninitialized constant ~
Tips
February 9, 2015

No matter what I do in Rails, when I feel like crying when I am told Routing Error uninitialized constant ~

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...

I tried to summarize Ruby's confusing arrays, hashes, and symbols.
Tips
January 7, 2015
5分で読めます

I tried to summarize Ruby's confusing arrays, hashes, and symbols.

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

Using the AWS SDK for Ruby to check the status of your EC2 instance
Tips
December 19, 2014
3分で読めます

Using the AWS SDK for Ruby to check the status of your EC2 instance

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...

Get top-level task names within Capistrano 3 tasks
Tips
October 29, 2014
3分で読めます

Get top-level task names within Capistrano 3 tasks

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...

Get the results of a MySQL query in bare Ruby
Tips
September 29, 2014
2分で読めます

Get the results of a MySQL query in bare Ruby

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. ...

Deploying EC2 Instances in Capistrano3 from New Creation to Initial Setup (Summary)
Tips
August 4, 2014

Deploying EC2 Instances in Capistrano3 from New Creation to Initial Setup (Summary)

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. ...

Put Capistrano tasks to sleep until the new EC2 instance is fully launched
Tips
July 31, 2014
3分で読めます

Put Capistrano tasks to sleep until the new EC2 instance is fully launched

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. ...

Initial setup of a newly created EC2 instance in Capistrano
Tips
July 30, 2014

Initial setup of a newly created EC2 instance in Capistrano

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. ...

SSH to a newly created EC2 instance in Capistrano
Tips
July 28, 2014
5分で読めます

SSH to a newly created EC2 instance in Capistrano

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...

Things to keep in mind when deploying AWS EC2 instances in Capistrano
Tips
July 25, 2014
6分で読めます

Things to keep in mind when deploying AWS EC2 instances in Capistrano

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. ...

Launching EC2 instances to different AvilabilityZones in Capistrano
Tips
July 8, 2014
5分で読めます

Launching EC2 instances to different AvilabilityZones in Capistrano

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. ...

Try deploying WordPress with Capistrano3
Tips
July 7, 2014
5分で読めます

Try deploying WordPress with Capistrano3

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". ...