Thijs
Thijs

Reputation: 3055

Database management Ruby On Rails

I'm new to Ruby On Rails, I allways used php to develop websites. With php I used MAMP and Sequel Pro to manage my database.

I would like to use Sequel Pro to manage my Rails database but I can't find the parameters to setup my Sequel Pro. Any help would be greatly appreciated.

Thijs

Upvotes: 1

Views: 2973

Answers (1)

Ryan Bigg
Ryan Bigg

Reputation: 107718

The parameters to set it up can be found in the config/database.yml configuration for the application. By default, Rails applications use SQLite3, and so you'd need to swap your database.yml over to using MySQL if you're wanting to use Sequel Pro:

development:
  adapter: mysql 
  username: your_username
  password: your_password
  database: your_database

You may also need to specify a socket parameter as well (underneath database, at the same indentation level). This is usually the case on Ubuntu.

  socket: /var/run/mysqld/mysqld.run

From there, you can then run rake db:create and rake db:migrate inside your application's folder to create and setup the database. If that works OK, then you should be able to connect to it using Sequel Pro and the credentials that you entered into your config/database.yml file.

Upvotes: 8

Related Questions