9 votes
RHTML File - What is an .rhtml file and how do I open it?
Learn about .RHTML files and view a list of programs that open them.
Languages
Overview
What is an RHTML file? An RHTML file is a webpage that combines HTML and Ruby code. Web applications built with the Ruby on Rails framework use RHTML files, which allow developers to embed Ruby scripts directly into HTML pages. When a user visits a website that uses RHTML files, the web server runs the Ruby code first to generate dynamic content before sending the completed HTML page to the user's browser.
More Information Developers use RHTML files to create web pages that can change based on user input, database content, or other conditions. For example, an RHTML file might display a user's profile information or list products pulled from a database. NOTE: RHTML files are often found in older Ruby on Rails projects, as the framework has since transitioned to using Embedded Ruby ( .ERB ) files for the same purpose.
MacroMates TextMate 1.5.9 Icon
Breadcrumbs
Previous / Next
In-Depth
.RHTML File Extension
Ruby HTML Web Page
| Developer | N/A |
| Popularity |
3.6 | 9 Votes |
What is an RHTML file?
An RHTML file is a webpage that combines HTML and Ruby code. Web applications built with the Ruby on Rails framework use RHTML files, which allow developers to embed Ruby scripts directly into HTML pages. When a user visits a website that uses RHTML files, the web server runs the Ruby code first to generate dynamic content before sending the completed HTML page to the user's browser.
More Information
Developers use RHTML files to create web pages that can change based on user input, database content, or other conditions. For example, an RHTML file might display a user's profile information or list products pulled from a database.
NOTE: RHTML files are often found in older Ruby on Rails projects, as the framework has since transitioned to using Embedded Ruby ( .ERB ) files for the same purpose.
How to open an RHTML file
You can open and edit RHTML files with any text or code editor, such as Microsoft Visual Studio Code or Sublime Text . However, to view the rendered webpage, you must run it on a web server configured to process Ruby on Rails applications. Without this setup, the embedded Ruby code will appear as plain text and will not execute.
Open over 400 file formats with File Viewer Plus . Free Download
Programs that open or reference RHTML files
Sort
Pricing
Program Name
Platform
Reset
X
All Platforms
Microsoft Visual Studio Code
Free
Sublime Text
Free Trial
Any text editor
Mac
MacroMates TextMate
Free
Category: Web Files
Updated: November 12, 2025