MySql Database Configration with Ruby On Rails


#1

Hello Everyone

MySql Database Configuration with Ruby On Rails.

Tell Me the correct way of using MySql Database with ROR.

Currently i am using Linux Ubuntu 14.04 & my Ruby Version : ruby
2.1.4,
Rails 4.2.5 & mysql : mysql Ver 14.14 Distrib 5.5.46.

Thanks

Best Webtech


#2

On 18 December 2015 at 05:26, removed_email_address@domain.invalid wrote:

Hello Everyone

MySql Database Configuration with Ruby On Rails.

Tell Me the correct way of using MySql Database with ROR.

Currently i am using Linux Ubuntu 14.04 & my Ruby Version : ruby 2.1.4,
Rails 4.2.5 & mysql : mysql Ver 14.14 Distrib 5.5.46.

Do you already know how to develop using ROR? If not then start by
working right through a good tutorial such as railstutorial.org (which
is free to use online) which will show you the basics of Rails.

Once you have done that (or if you already know how to develop with
rails) then in Gemfile remove any database specific gems you have and
replace with
gem ‘mysql2’
and in database.yml put
adapter: mysql2
socket: /var/run/mysqld/mysqld.sock

Colin


#3

Please look here:
http://edgeguides.rubyonrails.org/configuring.html#configuring-a-database