
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
erb2rux is an ERB to Rux converter. It's used to translate Rails view files, usually written in ERB (embedded Ruby) syntax, into Rux syntax. Rux allows you to write HTML in your Ruby code, much like JSX allows you to write HTML in your JavaScript. It's great for rendering view components.
Simply run gem install erb2rux
.
The project ships with a single executable called erb2rux
. It takes any number of files as arguments, or a single "-" character to read from standard input. In the case of standard input, erb2rux
will print the resulting Rux code to standard output (i.e. your terminal screen). Otherwise, the list of files will be transpiled and written to the same location as the original file, with either the default extension (.html.ruxt) or one you specify.
Here's an example showing how to transpile a single file:
erb2rux app/views/products/index.html.erb
This will create app/views/products/index.html.ruxt containing Rux code equivalent to the given ERB file.
To use a different extension, pass the -x option:
erb2rux -x .html.rux app/views/products/index.html.erb
Finally, here's the equivalent command using standard in/out:
cat app/views/products/index.html.erb | erb2rux -
bundle exec rspec
should do the trick.
Licensed under the MIT license. See LICENSE for details.
FAQs
Unknown package
We found that erb2rux demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.