Commit c78fd29f authored by John Noel's avatar John Noel

Added Better Errors in README.md

parent 389edbe4
# Getting Started with Rails, Docker
## Usage
## Setup
* Clone this repository
```bash
......@@ -101,8 +101,36 @@ production:
password: <%= ENV['RAILS_DATABASE_PASSWORD'] %>
```
* Create the ``development`` and ``test`` database
* Create the ``development`` and ``test`` databases
```bash
docker-compose run web rails db:create
```
## Adding [Better Errors](https://github.com/charliesome/better_errors) gem
* In ``Gemfile``, add these gems under ``development`` group.
```bash
group :development do
...
gem 'better_errors'
gem 'binding_of_caller'
end
```
* Run this command to setup Better Errors initializer file.
```bash
touch config/initializers/better_errors.rb
```
* Open ``config/initializers/better_errors.rb``.
* Add this code in ``config/initializers/better_errors.rb``
```bash
if Rails.env.development?
BetterErrors::Middleware.allow_ip! "0.0.0.0/0"
end
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment