Simple example of how to make use of nixpkgs-ruby
Nix 92.8%
Ruby 3.9%
Shell 2.6%
Other 0.7%
3 1 0

Clone this repository

https://tangled.org/deephackontech.bsky.social/nixpkgs-ruby-example https://tangled.org/did:plc:bielovapzmvz6zd2kzuibgvw/nixpkgs-ruby-example
git@tangled.org:deephackontech.bsky.social/nixpkgs-ruby-example git@tangled.org:did:plc:bielovapzmvz6zd2kzuibgvw/nixpkgs-ruby-example

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Setup steps for new project#

Make a .ruby-version file with your chosen ruby version. Create a Gemfile with your gems. Run the following commands to make a lockfile.

nix flake init --template github:bobvanderlinden/nixpkgs-ruby#
nix develop
bundle lock
bundix

Now you can add gems to the buildInputs and enable direnv. Reload the environment and you are ready to work with your chosen version of Ruby and associated Gems.

direnv allow <foldername>

Credit to Bob van der Linden bobvanderlinden@gmail.com for creating https://github.com/bobvanderlinden/nixpkgs-ruby