Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to pass rubyonrails test #1009

Merged

Conversation

bobvanderlinden
Copy link
Contributor

This includes several fixes that I ran into while trying to make the rubyonrails example pass the test.

I also ran into postgres unix socket path being too long, but that's already covered by #1008.

Rails listens on port 3000 by default.
The test outputted errors regarding upon running `rails new` that
`.gitignore` already exists. For the test it doesn't really matter to
overwrite these files, so I added `--force`.
Currently postgres fails to create a database because my username
contains a `.`. Wrapping the database name in `"` will resolve the
problem.

I've rewritten the line to use HEREDOC so that we do not have to mess
with escaping (from Nix) within escaping (from Bash) within escaping
(from psql). Now it only escapes using Nix and psql.
Currently whenever the examples are changed, devenv will need to be
rebuild. This isn't needed, because the package isn't relying on the
examples explicity.

Using `builtins.path` was just too much of a hassle (paths are absolute,
directory path needs to be match along with sub-files/directories).
Regex seemed easier.

Regex in Nix uses extended Posix, which is again a bit funky, but maybe
less so than doing matching by hand.
@domenkozar domenkozar merged commit 9a90212 into cachix:rust-rewrite Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants