.rb Ruby script
Text & source code
| MIME type | application/x-ruby |
|---|---|
| Description | Ruby script |
| Category | Text & source code |
| Based on | application/x-executable, text/plain |
Frequently asked questions
What is a .rb file?
A .rb file is a “Ruby script” (MIME type application/x-ruby).
How do I open a .rb file?
With any text editor – Notepad++, Visual Studio Code, or gedit and vim on Linux. The file contains readable text, possibly source code or configuration.
How can you tell a genuine .rb file?
No fixed signature at the start of the file is registered for this format; it is recognised mainly by its extension. On Linux and macOS, file --mime-type example.rb shows the guessed type.
Which format is .rb based on?
Technically a .rb file is a subtype of “Executable” (application/x-executable), so programs for that base format can often read it too.
Which MIME type belongs to .rb?
The MIME type is application/x-ruby. In the Apache web server: AddType application/x-ruby .rb; in nginx: types { application/x-ruby rb; }.