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

Adds support for relative url root #138

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

markstanley-nps
Copy link
Contributor

Closes #103

This replaces PR #130 to add support for relative_url_root

@brenogazzola hopefully this is easier to review.

You had commented that the below may need to account for the relative_url_root

mount app.assets.server => app.assets.config.prefix

We use rack config (config.ru) to run rails in the subdirectory as below, so we don't need the above changed

map '/subdirectory' do
  run Rails.application
end

We are currently using this change in our development pipeline, and it has been deployed to production. For production the static assets are served up by a separate server under the relative url.

lib/propshaft/assembly.rb Outdated Show resolved Hide resolved
@markstanley-nps
Copy link
Contributor Author

The suggested changes were a great idea and I have made them.

I was concerned that having both compilers and compile classes may be confusing, but have seen this used elsewhere

@brenogazzola brenogazzola merged commit 26082d0 into rails:main Jun 2, 2023
4 checks passed
@brenogazzola
Copy link
Collaborator

Thank you for your contribution!

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.

Propshaft appears to be ignoring Rails config.relative_url_root
2 participants