[RUBY] [Rails] AWS deployment error encounter summary


-Building a Ruby environment on an EC2 server -(Deployment ①) The most polite AWS commentary in the world. Until you bring your Rails app to AWS using EC2 -AWS Construction Fighting Diary-2 Memorandum -Building an Amazon Linux2 (MySQL5.7) environment with EC2 on AWS -Checking for Magick-config ... with gem install rmagick -RMagick 3.0.0 cannot be installed on Amazon Linux -A story I couldn't do when I tried to install Nginx on EC2 with yum -I tried deploying a Rails app using AWS + Nginx + Unicorn. ~ Part 1

Ruby installation

rbenv installation error

$ rbenv install -v 2.6.5
configure: error: in `/tmp/ruby-build.202005191817.10626/ruby-2.6.5':
configure: error: no acceptable C compiler found in $PATH

Resolve command

$ sudo yum install gcc openssl-devel
$ sudo yum install -y gcc-6 bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
$ sudo yum erase ruby.noarch
$ sudo yum install gcc

MySQL edition

Where is the root initial password?

$ cat /var/log/mysqld.log | grep password
A temporary password is generated for [email protected]: ************

Initial password login

$ mysql_secure_installation
Enter password for user root: ************
New password: ************
Re-enter new password: ***********

RMgick edition

RMagick installation error

$ bundle install --path vendor/bundle
An error occurred while installing rmagick (3.0.0), and Bundler cannot continue.
Make sure that `gem install rmagick -v '3.0.0' --source 'https://rubygems.org/'`

Resolve command

$ sudo yum -y install ImageMagick
$ sudo yum -y install ImageMagick-devel

Nginx edition

Nginx installation error

$ sudo yum install nginx
Loaded plugin:extras_suggestions, langpacks, priorities, update-motd
Package nginx is not available.
error:Do nothing

Resolve command

$ sudo amazon-linux-extras install nginx1.12
$ sudo yum install http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm -y
$ sudo yum install nginx -y

Post method measures after setting nginx.conf

$ cd /var/lib
$ sudo chmod -R 775 nginx

Recommended Posts

[Rails] AWS deployment error encounter summary
rails error resolution summary
Deployment error
rails AWS deployment is not reflected
Easy deployment with Capistrano + AWS (EC2) + Rails
Rails 6.0 Routing Summary
rails db: 〇〇 Summary
[Note] Rails error list
[Rails] Nginx, Puma environment deployment & server study [AWS EC2]
Catch Rails Routing Error
[Rails] devise-related routing summary
[Rails] Migration command summary
[Rails error] unexpected tIDENTIFIER
Mac Rails Install Error
[Rails] rails db command summary
rails heroku error log
[Rails] Heroku deployment flow
I tried automatic deployment with CircleCI + Capistrano + AWS (EC2) + Rails
How to deploy a Rails application on AWS (article summary)
For beginners! Automatic deployment with Rails6 + CircleCI + Capistrano + AWS (EC2)
rails error Library not loaded
[Rails] Rails version upgrade error memorandum
Error when using rails capybara
Ruby on Rails validation summary
[rails] error during devise installation
Summary of java error processing
Introduction to RSpec-Everyday Rails Summary-
[Rails] About Uglifier :: Error: Unexpected token: at the time of deployment