Pet project to learn ruby on rails. The project idea is to create a website for MidCity along the lines of other web comic websites. MidCity is a future pet project I have thought about every now and again. Once the website functionality is acceptable, I plan to create a customizable site usable by any web comic creator with easy setup.
If there are any extra steps that had to be taken which I forgot about, or mistakes made, please edit this README.
Project Info:
-
installation / setup
- install rails
- run 'cat Gemfile | grep "apt"' in the root directory, and install the noted system files
- run 'bundle install' within the root directory
- setup the database as noted BELOW in the database creation section
- run 'rails server' and go to the local url.
- create a user.
- in psql, change the users role to 'admin' (UPDATE users SET role = 'admin'), no this is not ideal and I would like to put it in the credentials instead soon.
- is it over? Its over! Yay!
-
Ruby version: 2.7
-
System dependencies: look in the Gemfile for gems and system files
-
Configuration: Public configuration not yet set, passwords etc currently utilizing master.key
-
Database creation / initialization:
- if you are NOT using postgres, go install needed packages and gems for yourdatabase, and then modify config/database.yml accordingly
- follow the installation / setup section ABOVE (yes up there) until you hit database creation.
- log onto postgres: run 'sudo -u postgres psql'
- create the databases:
- 'CREATE DATABASE toonrail_dev;'
- 'CREATE DATABASE toonrail_tst;'
- 'CREATE DATABASE toonrail_prod;'
- sidenotes:
- '\l' will list the databases
- '\connect toonrail_dev' connects to the development database so you can write sql on it (aka 'SELECT * FROM pages;')
- '\d' will list the diffrent tables in a database
- set a password to connect to postgres
- create a postgres password
- get out of psql
- in the root directory run 'EDITOR="atom --wait" bin/rails credentials:edit', more info
- set the 'database_default_password' enviroment variable used in config/database.yml. All passwords, keys, and localized configuration should be set using credentials:edit
- autopopulate schema:
- From the root directory run 'rails db:schema:load'
- you can check that the production database was properly set up in psql, if you like
-
How to run the test suite: run 'rspec' from the project root. Read more about rspec
-
Services (job queues, cache servers, search engines, etc.): will connect to google, twitter, disqus, discord and facebook for ease of signup
-
Deployment instructions: we are not there yet, but probably heroku
-
Notable technologies developers may encounter
- acts as commentable streamlines our commenting backend code in controllers and models
- acts as voteable streamlines how we vote on comments and pages
- haml simplifies our view code dramatically
- devise handles our authentication logic
- summernote is our user friendly front end WYSIWYG editor
- simpleform can be helpful in quickly writing forms
- carrierwave handles file uploads and downloads (especially with pictures from summernote)
- rspec-rails and factory-bot-rails are our testing framework
- sass (more), bootstrap (more), jquery (more) and coffee-script drive our front end design.