-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc82ee2
commit 1aa768d
Showing
1 changed file
with
14 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,22 @@ | ||
# monte-cinema | ||
|
||
Create database: | ||
A simple Ruby on Rails cinema ticket booking system developed for third Monterail's bootcamp | ||
|
||
`$ bin/rails db:create` | ||
## Dependencies | ||
|
||
Create database and add data from `seeds.rb` into it | ||
- Ruby 3.1.2 or higher | ||
- Ruby on Rails 7.0.3 or higher | ||
- PostgreSQL 14.5 or higher | ||
|
||
`$ bin/rails db:setup` | ||
## Local setup | ||
|
||
Drop database: | ||
1. Download project: `git clone https://github.com/marcel-strzalka/monte-cinema.git` | ||
2. Move into newly created directory: `cd monte-cinema` | ||
3. Install necessary dependencies: `bundle install` | ||
4. Create database and fill it with initial data: `bundle exec rails db:setup` | ||
5. Start a local development server: `bundle exec rails server` | ||
6. Open your browser and go to http://localhost:3000/ | ||
|
||
`$ bin/rails db:drop` | ||
## Live version | ||
|
||
Add data from `seeds.rb` into already existing database | ||
|
||
`$ bin/rails db:seed` | ||
|
||
Start server: | ||
|
||
`$ bin/rails server` | ||
|
||
Generate controller: | ||
|
||
`$ bin/rails generate controller CONTROLLER_NAME --skip-routes` | ||
|
||
Generate model: | ||
|
||
`$ bin/rails generate model MODEL_NAME COLUMN_NAME:COLUMN_TYPE...` | ||
|
||
Run migration: | ||
|
||
`$ bin/rails db:migrate` | ||
|
||
Open console: | ||
|
||
`$ bin/rails console` | ||
You can find a live version of this application: [here](https://marcel-strzalka-monte-cinema.herokuapp.com/) |