A Rails gem providing a web-based database viewer and SQL query runner for inspecting, editing, and managing your application's database.
Rails DB is a Ruby on Rails gem that provides a web-based interface for viewing, querying, and managing your application's database. It allows developers to inspect table contents, run SQL queries, export data, and edit records directly from the browser, streamlining database interactions during development.
Rails developers and teams who need a built-in tool for database inspection and query execution without relying on external database clients or command-line interfaces.
Developers choose Rails DB for its seamless integration into Rails applications, offering a feature-rich, web-based alternative to external database tools with support for multiple databases, embeddable data tables, and customizable access controls.
Rails Database Viewer and SQL Query Runner
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Directly mounts into Rails apps via automatic routes, providing a web interface at /rails/db that eliminates the need for external database clients and reduces context switching during development.
Includes autocomplete, syntax highlighting, and query history for executing SQL queries, with support for EXPLAIN results to analyze query performance.
Exports table data to CSV and Excel formats, with optional gem integration for .xlsx files, making it easy to share or backup application data.
Offers helper methods to embed live database tables into any Rails view, useful for building internal dashboards or admin panels without extra code.
Supports HTTP Basic authentication or role-based verification via a configurable proc, allowing integration with tools like Devise to restrict access to authorized users.
Only confirmed to work with PostgreSQL, MySQL, and SQLite; the README states uncertainty about other adapters, which could be problematic for non-standard databases.
Requires manual installation of database-specific gems like mysql2, as noted in common issues, adding setup complexity and potential version conflicts.
Key features like schema visualization, ERD tools, and enhanced CRUD are listed as future plans in the README, leaving gaps for users needing those capabilities now.
Despite access controls, exposing a web-based database interface in production environments increases attack surface, and the README advises caution, highlighting potential vulnerabilities.