Skip to content

Commit

Permalink
make text shorter
Browse files Browse the repository at this point in the history
  • Loading branch information
ka8725 authored Apr 18, 2024
1 parent beb6e29 commit 9d69af3
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ And then execute:

$ bundle install

If you cannot commit changes to the repo or Gemfile, consider the local Gemfile installation described in this [post](https://blog.widefix.com/personal-gemfile-for-development/).

## Usage

Just run `rails db:migrate` inside the current branch.
Expand All @@ -59,32 +61,6 @@ The gem offers the following rake tasks that can be manually run according to yo
- `rails db:rollback_branches` - run it to manually rolls back phantom migrations.
- `rails db:phantom_migrations` - displays a list of phantom migrations.

### Local usage

If you're passionate enough about developing with your beloved gems alongside the general Gemfile but separate from it, you could leverage this trick:

- create a root file named `Gemfile.local` with this contents

```
eval_gemfile 'Gemfile'
gem 'actual_db_schema'
*# add more of your favorite gems*
```

- install the gems with single command `BUNDLE_GEMFILE=Gemfile.local bundle install`
- alternatively, define the environment variable in your shell profile or .env file `export BUNDLE_GEMFILE=Gemfile.local` and then install with `bundle install`

The changes made in the local Gemfile should not be committed. Therefore, add it to `~/.gitignore` file. Note, it's a global config to eliminate any commits into the repo:

```
Gemfile.local
Gemfile.local.lock
```

If you want to commit changes into the original Gemfile, you should unset the BUNDLE_GEMFILE environment variable using `unset BUNDLE_GEMFILE` or temprorary set it to the original Gemfile with `BUNDLE_GEMFILE=Gemfile bundle install`

[Learn more about customizing your Gemfile](https://blog.widefix.com/personal-gemfile-for-development/)

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Expand Down

0 comments on commit 9d69af3

Please sign in to comment.