Click the "Select File" button above, and choose your GEMSPEC file.
You’ll see a preview, if available.
Click the "Convert file to..." button to extract text information.
Convert GEMSPEC to another file type
To convert GEMSPEC Specifications to another format, you need RubyGems or other Developer software.
Convert a file to GEMSPEC
To convert other file formats to the "Package Metadata Script" file type, you need software like RubyGems or a similar tool.
About GEMSPEC files
A .gemspec file acts as the blueprint for building a Ruby package (known as a gem). It contains essential metadata such as the package name, version, author, description, and required dependencies. This file is natively processed by RubyGems, the standard package manager for the Ruby programming language. Developers write and edit these files in standard code editors like Visual Studio Code. Because a .gemspec is actually a valid Ruby script rather than a static data format like JSON, it has significant disadvantages for portability. To safely read or parse its contents programmatically, you typically need a full Ruby execution environment. This makes it difficult for third-party tools to extract package dependencies without executing potentially unsafe code. Users often need to convert the data inside a .gemspec to static formats like JSON or YAML for external CI/CD pipelines or dependency analysis tools. Developers also compile the .gemspec into a compiled gem archive using the command line. Standard online converters fail to process .gemspec files because they cannot safely evaluate Ruby code.
Convert.Guru analyzes your GEMSPEC file, detects the exact format, and lets you read the text inside.
FAQ
If you want to convert GEMSPEC file to JS, TS, PY, JAVA, CPP, C, CS, PHP, RB, GO, RS or SWIFT, you can use RubyGems or similar software from the "Ruby Package Metadata Definition" category. In the File menu, look for Save As… or Export….
To convert SH, PY, KT, PS1, SWIFT, LUA, PL, JAVA, SCALA, JS, VBS or TS files to GEMSPEC, try RubyGems or another comparable tool in the "Ruby Package Metadata Definition" category.
The GEMSPEC Converter Story
The history of Convert.Guru began over 25 years ago in California with Tom Simondi’s file-format database. A former contributor to Space Shuttle development and a software pioneer of the 1980s, Simondi established a trusted resource for file type analysis that was even referenced by Microsoft Windows XP. Today, we use modern technology to process and convert thousands of file formats while continually improving our GEMSPEC converter.