A record of the time it took to deploy mysql on Cloud9 + Rails

-Try to create a Rails application with Cloud9 + Rails + MySQL. ・ It takes time to install MySQL. -Since rails new was already executed, when mysql is described in Gemfile and bundle install is executed, an error occurs.

An error occurred while installing mysql2 (0.5.2), and Bundler cannot continue.
Make sure that `gem install mysql2 -v '0.5.2' --source 'https://rubygems.org/'` succeeds before bundling.

procedure

https://qiita.com/kumas/items/e2c647dca08fd46b5c7a I created the application with reference to this, but it took time because of lack of knowledge.

① Move to the created directory and execute rails new

② In Gemfile

gem 'sqlite'
#Change default sqlite to MySQL

gem 'mysql'

③ The above error when executing bundle install

sudo yum install mysql-devel

It is said that it will be solved with, but this is also returned with an error and I am sorry. ..

The solution

sudo apt-get install libmysqld-dev

"No, I chose Ubuntu when creating cloud9 environments. Is that an error?" When I looked it up, it was. Or rather, I didn't understand the basics.

https://qiita.com/ryota-0906/items/2da9dcd54a6840b59364 https://qiita.com/hal-bo/items/1e0568120c545bf723c6

If you are using the RedHut yum command with a different package format in the Ubuntu environment, you will get an error. Transcendence Basically, you have to understand the format of Linux package files.

Recommended Posts

A record of the time it took to deploy mysql on Cloud9 + Rails
I wanted to use the find module of Ansible2, but it took some time, so make a note
How easy is it to synthesize a drug on the market?
[Python3] Define a decorator to measure the execution time of a function
A command to easily check the speed of the network on the console
How to deploy a web application on Alibaba Cloud as a freelancer
How to update the python version of Cloud Shell on GCP
[AWS / Tello] Build a system to operate the drone on the cloud
It is surprisingly troublesome to get a list of the last login date and time of Workspaces
Randomly play the movie on ChromeCast for a certain period of time
Semi-automatically generate a description of the package to be registered on PyPI
I measured the run queue wait time of a process on Linux
Upgraded mysql on Cloud9 (Amazon Linux) (5.5 to 5,7)
Python: I want to measure the processing time of a function neatly
Upload data to s3 of aws with a command and update it, and delete the used data (on the way)
GAE --With Python, rotate the image based on the rotation information of EXIF and upload it to Cloud Storage.
I made a tool to estimate the execution time of cron (+ PyPI debut)
A programming beginner tried to find out the execution time of sorting etc.
How to access the contents of a Linux disk on a Mac (but read-only)
I tried to rescue the data of the laptop by booting it on Ubuntu
I made a script to record the active window using win32gui of Python
Make it easy to specify the time of AWS CloudWatch Events with CDK.
How to calculate the volatility of a brand
Calculate the probability of outliers on a boxplot
Record of Pythonist reincarnated in Ruby on Rails
At the time of python update on ubuntu
The story of Airflow's webserver and DAG, which takes a long time to load
Try to create a battle record table with matplotlib from the data of "Schedule-kun"
It was a life I wanted to OCR on AWS Lambda to locate the characters.
I want to take a screenshot of the site on Docker using any font
[Rails] v1.0 came out on google-cloud-vision of gem, so I tried to support it
It was a little difficult to do flask with the docker version of nginx-unit
A memo on how to overcome the difficult problem of capturing FX with AI
I tried to make it easy to change the setting of authenticated Proxy on Jupyter
A memo to visually understand the axis of pandas.Panel
[Azure] Deploy locally created ML model to the cloud
Try to estimate the number of likes on Twitter
Steps to calculate the likelihood of a normal distribution
It took me half a day to install Polyglot in the anaconda environment on my mac, so I'll leave a note
A Study on Visualization of the Scope of Prediction Models
Create a shape on the trajectory of an object
Python Note: The mystery of assigning a variable to a variable
[OCI] Python script to get the IP address of a compute instance in Cloud Shell
I made a function to crop the image of python openCV, so please use it.
How to easily draw the structure of a neural network on Google Colaboratory using "convnet-drawer"
An easy way to view the time taken in Python and a smarter way to improve it
[Python] Change the Cache-Control of the object uploaded to Cloud Storage
[Ubuntu] How to delete the entire contents of a directory
A note on the default behavior of collate_fn in PyTorch
A story that took time to understand python's argsort (memorial)
Let's execute the command on time with the bot of discord
How to deploy the easiest python textbook pybot on Heroku
A record of hell lessons imposed on beginner Python students
I made a function to check the model of DCGAN
[Introduction to AWS] A memorandum of building a web server on AWS
How to register a package on PyPI (as of September 2017)
How to find the scaling factor of a biorthogonal wavelet
I want to know the legend of the IT technology world
I want to create a Dockerfile for the time being.
Is there a secret to the frequency of pi numbers?
How to connect the contents of a list into a string