Brut - The Raw, Simple, Powerful, Standards-Based Web Framework
Brut is a way to make web apps with Ruby, captializing on the knowledge you have—HTTP, HTML, CSS, JavaScript, SQL—without requiring too much extra stuff to learn.
Installation
Add this line to your application's Gemfile:
gem "brut"
And then execute:
$ bundle
Or install it yourself as:
$ gem install brut
Getting Started
Please note there is extensive documentation, however to get started, you can use mkbrut:
docker run --pull always \
-v "$PWD":"$PWD" \
-w "$PWD"
-it \
thirdtank/mkbrut \
mkbrut your-new-app
If you have Ruby 3.4 installed somewhere, you can use this via RubyGems as well:
> gem install mkbrut
> mkbrut your-new-app
Developing
The dev environment is managed by Docker and you are encouraged to use this. It's set up so you can edit your code on your computer with your editor, but all commands are run inside Docker, which should be more consistent across developer workstations.
- On Windows, setup WSL2
- Install Docker
Build the image(s) you will use to start containers where development happens:
dx/build
Start up the dev environment
dx/start
At this point, you can "log in" to the virtual machine/docker container via:
dx/exec bash
From there, you have a UNIX prompt where you can run all commands. You can also run any command via:
dx/exec ls -l # or whatever
This is how you can configure your editor to issue commands and access their output.
To set everything up:
dx/exec bin/setup --no-credentials
The
--no-credentials
means that you will not be able to push to GitHub or RubyGems from within the Docker container. This ability is only needed by maintainers to push new versions of the gem. You can push to GitHub from your computer.