Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

Opal

opalrb.com

  • Free plan
  • Windows
  • macOS
  • Linux
  • Web
7.9 Club score Visit opalrb.com

What Opal is

Opal is a Ruby-to-JavaScript compiler for developers who want to use Ruby in JavaScript environments. It converts Ruby source into plain JavaScript ahead of time, without requiring a runtime interpreter, and includes implementations of Ruby’s core and standard libraries. Ruby code can call JavaScript, JavaScript can call Ruby, and native JavaScript classes can be used as Ruby classes. The project describes sharing a gem, objects, and specs between server and client code. Opal can run in browsers as well as Node.js, Deno, Bun, and QuickJS. Its upcoming 2.0 release targets ES2021; the project lists current and previous stable Firefox, Chrome, Safari, and Edge, but not Internet Explorer. That release has no transpilation fallback for older JavaScript engines. Integrations are listed for Rails, Sinatra, Roda, and static apps. Install it with `gem install opal` or add the gem to a Gemfile. Opal is free, MIT-licensed software with CLI and API access.

Who it suits

Opal suits Ruby developers who want to compile Ruby code for JavaScript environments or share code between server and client. Its integrations include Rails, Sinatra, Roda, and static apps.

Good to know, and what to watch

  • Compiles Ruby to JavaScript ahead of time.
  • Supports calls between Ruby and JavaScript.
  • Can share gems, objects, and specs across server and client.
  • Free and released under the MIT License.
  • Upcoming 2.0 targets ES2021.
  • No transpilation fallback for older JavaScript engines.
  • Internet Explorer is unsupported for the upcoming 2.0 release.

Opal

Free

Free plan

The verdict

Opal brings Ruby code into JavaScript environments while retaining access to JavaScript from Ruby and vice versa. Check the ES2021 target and browser support before choosing it for older engines.

What the maker publishes

Browsers
For the upcoming 2.0 release, the project lists current and previous stable Firefox, Chrome, Safari, and Edge as supported and says Internet Explorer is unsupported. source
Code sharing
The project describes using the same gem, objects, and specs on both the server and client. source
Compilation
Opal compiles Ruby to plain JavaScript ahead of time, without a runtime interpreter. source
Execution targets
The project says Opal can run in browsers and in JavaScript environments including Node.js, Deno, Bun, and QuickJS. source
Framework integrations
The project lists integrations for Rails, Sinatra, Roda, and static apps. source
JavaScript interop
Opal supports calling JavaScript from Ruby and Ruby from JavaScript, and treating native JavaScript classes as Ruby classes. source
License
Opal is released under the MIT License. source
Maker details
The opened official pages identify Adam Beynon in the license copyright notice but do not state a headquarters or founding date. source
Rails usage
The official homepage shows using opal-rails in a Rails app and requiring opal_ujs and turbolinks in its example. source
Ruby compatibility
The repository says the gemspec declares Ruby >= 2.3 and CI exercises Ruby 3.0 through 4.0 and JRuby. source
Ruby installation
The project instructs users to install Opal with `gem install opal` or add the gem to a Gemfile. source
Runtime requirement
Opal 2.0 targets ES2021 and has no transpilation fallback for older JavaScript engines. source
Support
The project directs users to Slack, Stack Overflow with the #opalrb tag, and GitHub issues for bugs and feature requests. source
What it does
Opal is a Ruby-to-JavaScript source-to-source compiler that includes an implementation of Ruby corelib and stdlib. source

Checked against the maker's pages on 7 Oct 2026.