This is a professional Ruby application that uses Sinatra and SQLite3 to create a web application with Bootstrap styling.
- Bootstrap Styling: The application uses Bootstrap for a clean and modern user interface.
- User List: The application queries data from a SQLite3 database and displays a list of users.
- Contact Form: The application includes a contact form in a modal dialog.
- Ruby: The application is written in Ruby.
- Sinatra: Sinatra is used as the web application framework.
- SQLite3: SQLite3 is used as the database for storing user data.
- Bootstrap: Bootstrap is used for styling the web application.
The application connects to a SQLite3 database using the sqlite3
gem. The database is set up in the setup_db.rb
file, where a users
table is created and populated with sample data.
The project consists of three main files:
index.rb
: This is the main HTML file for the web application.app.rb
: This is the main Ruby file that sets up the Sinatra application and routes.setup_db.rb
: This file sets up the SQLite3 database.
To get started with this project:
- Clone the repository.
- Install the required gems with
bundle install
. - Set up the database with
ruby setup_db.rb
. - Start the Sinatra application with
ruby app.rb
.
This project serves as a great starting point for learning how to create a web application with Ruby and Sinatra. It demonstrates how to set up a SQLite3 database, how to query data from the database, and how to display the data in a web page.
Contributions to this project are welcome. Please fork the repository and create a pull request with your changes.