Viewing your SQLLite Data (Ruby on Rails beginners)
When people are starting out with Ruby on Rails, one of the key elements is to be able to view the contents of the SQL file. For most people, they will use the SQLLite database. This is a limited implementation of SQL. The tables are all stored in one file which is located in /db of your Rails project.
When you go into production you will almost certainly transition to some version of an SQL server: Microsoft SQL Server, MySQL, Postgres or some other flavor of SQL. These will offer a lot more control as well as multi threading.
However, the beauty of Rails is that you can work in a development mode and then migrate your database when you go into production.
In order to view the SQL Tables and fields, you need to have a tool that will allow you to do so. There are a number of excellent free tools such as SQL Lite Browser.
Once you download and install this tool, you can view your data. Some things to keep in mind are:
- You should not make changes to the table structures via such a tool. That should be done within Rails via migrations.
- You can make changes to the data. This is often helpful. However, you should (1) Remember to write the changes (2) Close the file in SQL Lite Browser before working again with your Rails application. Hint, you can go back to open and you should see your project database in the recent items.
- To get to your database, look in the /db folder in your rails app. You need to know where your rails projects are stored and drill down from there. For example, if you were using the Aptana Studio IDE with the default workspace, they might be in C:UsersyouridDocumentsAptana Studio 3 Workspaceyourprojectdb. You should see a file called development.sqllite3.
- Responsive pages with Artisteer / Ruby
- Artisteer templates with Ruby on Rails – Header and graphics not showing – solution
- Running Rails Console in production while using Spring
- Using Always Up to run Ruby on Rails Puma Servers as a service on Microsoft IIS servers.
- Accessing an external sql database from a rails app where the schema prefix differs from the schema prefix used for the app’s tables.
- Date Pickers in Rails (Internet Explorer and other browsers)
- Rails- How to tell the type of a column.
- Creating Entity Relationship Diagrams in Rails.