This gem replaces the Rails default pending migration page with a small React app which allows you to run your migration scripts from your web browser.
So before this gem you had this :
After having installed this gem you will have this :
The ActiveRecord Migration UI page will show up as soon as you installed the gem, restarted your server and have at least one pending migration script.
Click the "Migrate now!" button to run the pending migration scripts.
Add this gem where you want to it to be available.
It is recommended to use it only on your environment machine, but you could also deploy it to your staging environment for instance.
Add this line to your application's Gemfile:
group :development do gem 'active_record_migration_ui' end
And then execute:
Or install it yourself as:
$ gem install active_record_migration_ui
- Install docker-sync:
gem install docker-sync
- Build the Docker image:
docker-compose build webpack
- Boot webpack:
docker-sync-stack startThis step will fail with the error:
error Command "webpack-dev-server" not found.TODO : find a way to not have this error
- Install NPM packages
$ docker-compose run --rm -v armui-sync:/gem:nocopy webpack yarn
- Restart again docker-sync:
Now you should see webpack running on port 3036.
When you need SSL
In this case you have to update the
config/webpacker.yml file in order to update the
https: false attribute to:
development: # ... dev_server: # ... https: key: | -----BEGIN PRIVATE KEY----- -----END PRIVATE KEY----- cert: | -----BEGIN CERTIFICATE----- -----END CERTIFICATE----- ca: | -----BEGIN CERTIFICATE----- -----END CERTIFICATE-----
Don't forget to restart the webpack container.
Running the tests
After having followed the (Development)[#development] steps, you have a
container (and a
$ docker-compose exec webpack bash -c 'RAILS_ENV=production bin/webpack'
When this is done, you are ready to execute the tests :
$ docker-compose exec webpack rake
To debug from this web browser, you can have a look at the
file, and change the
selenium service from:
services: selenium: image: selenium/standalone-chrome:3.141.59-palladium # image: selenium/standalone-chrome-debug:3.141.59-palladium # ports: # - "5900:5900" volumes: - /dev/shm:/dev/shm ...
services: selenium: # image: selenium/standalone-chrome:3.141.59-palladium image: selenium/standalone-chrome-debug:3.141.59-palladium ports: - "5900:5900" volumes: - /dev/shm:/dev/shm ...
Then restart the stack and you can now connect via VNC to
and use the
We made an
ARCHITECURE.md file in order to guide you through this gem's code.
- Fork this gem
- Implement your new features
- Clean your branch history
- Open a Merge Request
The gem is available as open source under the terms of the MIT License.
Releasing a new version
- Run the
docker-sync-stack startcommand (See Development).
docker-compose run --rm -v armui-sync:/gem:nocopy webpack bash -c 'RAILS_ENV=production RAILS_MASTER_KEY=4d046dc285e33d0750e78d7effe25f3b rails build'
This will produce the gem in the