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