Connect Rails to SQLEye
Set DATABASE_URL to the instance’s URL. Rails documents the postgresql adapter for PostgreSQL and mysql2 for MySQL, and a mysql:// URL maps to mysql2.
How do I configure PostgreSQL?
Section titled “How do I configure PostgreSQL?”export DATABASE_URL="postgresql://postgres@127.0.0.1:5432/myapp"How do I configure MySQL?
Section titled “How do I configure MySQL?”export DATABASE_URL="mysql://root@127.0.0.1:3306/myapp"Replace the port with your instance’s port. If your client requires a password field, leave it empty.
How do I create the database?
Section titled “How do I create the database?”Create it with the CLI clients before running your migrations.
Source: Rails configuring guide. To spot N+1 loads in your Active Record code, turn on capture.
SQLEye is developed and maintained by CodeROG. This page is also available as Markdown.