Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aachourmohamed/blog-rails
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.
https://github.com/aachourmohamed/blog-rails
gem linter postgresql ruby ruby-on-rails
Last synced: 4 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/aachourmohamed/blog-rails
- Owner: AACHOURMOHAMED
- Created: 2022-10-19T06:18:20.000Z (about 2 years ago)
- Default Branch: dev
- Last Pushed: 2022-11-04T14:39:34.000Z (about 2 years ago)
- Last Synced: 2024-11-02T00:22:11.053Z (about 2 months ago)
- Topics: gem, linter, postgresql, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 6.14 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![](https://img.shields.io/badge/Microverse-blueviolet)
# Blog rails
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.
## Built With
- Ruby on Rails
## Live Preview
### [Live Demo]()## Additional Tools
- rubocop
- stylelint
- Ruby Gems## Versions
- Ruby ~3.1.2
- PostgreSQL ~14.0
- Node.js ~16.17.0
- Yarn ~1.22.19## `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`
### Running specs:
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
```### rails tests:
```
$ bin/rails test
```### To track linter errors locally follow these steps:
Track Ruby linter errors run:
```
$ rubocop
```
To auto-correct correctable Rubocop offenses run:
```
$ rubocop --auto-correct-all | rubocop -A
```## `Authors`
π€ **Aachour Mohamed**
- GitHub: [@AACHOURMOHAMED](https://github.com/AACHOURMOHAMED)
- LinkedIn: [LinkedIn]()## π€ Contributing
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://github.com/AACHOURMOHAMED/blog-rails/issues).
## Show your support
Give a βοΈ if you like this project!
## Acknowledgments
- This project is part module 5 in the Microverse study program.
- Thanks to the Microverse team for the great curriculum.
- Thanks to Code Reviewers for the insightful feedback.
- A great thanks to My coding partners, morning session team, and standup team Partners for their contributions.## π License
This project is [MIT](./MIT.md) licensed.