bolg-rails will be a classic example of a blog website. This will be a fully functional website that will show the list of posts and empower readers to interact with them by adding comments and liking posts.
The Blog rails app will be a classic example of a blog website. This will be a fully functional website that will show the list of posts and empower readers to interact with them by adding comments and liking posts.
Getting Started
To get a local copy of this project:
Clone this repository or download the Zip folder:
$ git clone [email protected]:AACHOURMOHAMED/blog-rails.git
Then:
$ cd blog-rails
$ gem install bundler
$ bundle install
To start App:
$ rails server
To view on browser:
http://localhost:3000
Database creation
Create a Postgres user:
$ su - postgres
After that access Postgres:
psql
Then create a user (or a role, as Postgres calls it):
CREATE ROLE rubyonrails WITH CREATEDB LOGIN PASSWORD '1234';
Initialize the database:
$ bin/rails db:setup
Migrate the database:
$ bin/rails db:create
Tests
Default: Run all spec files (i.e., those matching spec/**/*_spec.rb):
$ bundle exec rspec
Run all spec files in a single directory (recursively):
$ bundle exec rspec spec/models
Run a single spec file:
$ bundle exec rspec spec/controllers/accounts_controller_spec.rb
Run a single example from a spec file (by line number):
$ bundle exec rspec spec/controllers/accounts_controller_spec.rb:8
See all options for running specs:
$ bundle exec rspec --help
$ bin/rails test
Track Ruby linter errors run:
$ rubocop
To auto-correct correctable Rubocop offenses run:
$ rubocop --auto-correct-all | rubocop -A
Authors
Aachour Mohamed
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a if you like this project!
This project is MIT licensed.