RubyBook is a VSCode extension that provides a notebook interface for Ruby code. :notebook:
This extension spawns a
pry process in the background to allow users to create experiences with connected, executable Ruby cells and informational Markdown cells. :tada:
Currently, this extension works for Mac and Linux systems only.
- Run Ruby code within cells
- Organize multiple cells in a file with data flowing from one cell to the next
- Use Markdown to create human-readable cells documentating the code
- Uses the power of pry to run code and maintain variables and results between multiple cells.
Mac or Linux system
Note: The extension spawns a process by just running
pry, so please make sure that
pry is installed properly and added to the PATH. Easiest way to check is to run
pry from terminal.
Search 'RubyBook' in the VSCode extensions tab
RubyBook - VSCode Extenstion URL
VSCode Extension Installation
How to use
- Open or create a file with the extension
- Search for
RubyBook in the VSCode command palette
No settings, as of now. Configuration settings like execution timeouts, polling interval for output, etc. coming soon. Currently, the execution does not timeout and tries to run forever. The
pry process is polled for output every 500 ms.
- The extension adopts a little hacky method to poll for completion of a code cell. It checks for the existence of the
pry prompt (for ex.,
 pry(main)>) instead of gracefully inspecting Node.js I/O streams.
- No configuration settings for execution timeouts or polling intervals. Note: You can stop execution of a command through the VSCode UI.
- Window not focused on a newly created RubyBook.
- Configuration settings
- Add comments in the extension code
- Add example
- Add language icon
- A custom renderer to colorize and pretty print output and errors for code execution cells
If you have any issues, bugs or suggestions, please feel free to create a Github issue
If you are willing contribute, please start a discussion and feel free to create a pull request
Initial release of RubyBook :tada: