Announcing a new toolset for testing or developing Ruby on Rails app: PmRails

I have released PmRails Version 1.0.0.

PmRails is a toolset for testing or developing Ruby on Rails applications without installing Rails or its dependencies into your local environment. It leverages Podman to create an isolated, containerized environment for your Rails projects.

The PmRails consists of a collection of simple shell scripts based on the following ideas:

Running rails new

You can create a new Rails application with a single command:

podman run -it --rm -v "$PWD":/x -w /x ruby:latest sh -c "gem install rails -v 8.0.1 && rails new sample_app --skip-bundle"

Move to the application directory:

cd sample_app

Running bundle install

You can install the required gems for your application with a single command:

podman run -it --rm -v "$PWD":/x -w /x ruby:latest sh -c "bundle config set --global path 'vendor/bundle' && bundle install"

Running rails server

You can start the Rails server with a single command:

podman run -it --rm -v "$PWD":/x -w /x -p 3000:3000 ruby:latest sh -c "bundle config set --global path 'vendor/bundle' && bin/rails server -b 0.0.0.0"