This document covers gitignore patterns for Ruby-based and JVM-based programming languages, as well as specialized build tools and frameworks within these ecosystems. Specifically, this includes:
For other JVM languages, see: Java development artifacts in section 2.4 For Clojure and other functional JVM languages, see 3.5
The following diagram maps the relationship between the languages and the build tools covered in this section.
Diagram: Ruby and JVM Tooling Ecosystem
Sources: Ruby.gitignore1-57 Rails.gitignore1-70 Maven.gitignore1-18 Gradle.gitignore1-22 PlayFramework.gitignore1-17
Ruby projects generate bytecode, package artifacts, and dependency management directories that should be excluded to maintain environment neutrality.
Ruby generates bytecode files (*.rbc) and gem packages (*.gem) Ruby.gitignore1-2 Bundler, the standard dependency manager, creates local configuration and vendored paths that are typically ignored to avoid committing large binary dependencies.
Diagram: Ruby Dependency and Environment Flow
Key Exclusions:
/.bundle/: Local Bundler configuration Ruby.gitignore42/vendor/bundle: Local gem installations Ruby.gitignore43*.rbc: Ruby bytecode Ruby.gitignore2/.yardoc/ and /doc/: Generated documentation Ruby.gitignore36-38Sources: Ruby.gitignore1-50
The Rails template extends Ruby patterns with framework-specific artifacts for databases, logs, and the asset pipeline.
| Category | Patterns | Reason |
|---|---|---|
| Databases | /db/*.sqlite3, /db/*.sqlite3-journal | Local development databases Rails.gitignore4-5 |
| Logs/Temp | /log/*, /tmp/* | Runtime logs and PID/cache files Rails.gitignore15-16 |
| Secrets | config/master.key, .env | Sensitive credentials and environment vars Rails.gitignore22-29 |
| Assets | /public/assets, node_modules/ | Precompiled assets and JS dependencies Rails.gitignore54-59 |
| Storage | /storage/*, /public/uploads | User-uploaded content in development Rails.gitignore67-69 |
Sources: Rails.gitignore1-70
Maven and Gradle are the primary build automation tools for the JVM ecosystem. Their templates focus on excluding build outputs and wrapper binaries.
Maven uses a standard target/ directory for all build artifacts. It also interacts with IDEs like Eclipse via the m2e plugin.
target/: All compiled classes and JARs Maven.gitignore1release.properties: Created during the release process Maven.gitignore6.mvn/timing.properties: Maven build timing data Maven.gitignore9.project and .classpath: Eclipse-specific files generated by Maven Maven.gitignore15-17Sources: Maven.gitignore1-18
Gradle uses a .gradle cache directory and a build/ folder for outputs. It specifically allows the inclusion of the Gradle Wrapper to ensure build reproducibility.
Diagram: Gradle Build Entity Mapping
**/build/: Build outputs, but the pattern explicitly excludes src/**/build/ to avoid catching source files Gradle.gitignore2-3!gradle-wrapper.jar: The wrapper JAR is explicitly un-ignored so it can be committed Gradle.gitignore9.gradletasknamecache: Local task execution cache Gradle.gitignore15Sources: Gradle.gitignore1-22
Scala development often involves the Play Framework, which has a specific directory structure for web applications.
The Play template targets working directories, logs, and distribution packages.
/target: Main build output PlayFramework.gitignore10/logs/: Application runtime logs PlayFramework.gitignore6server.pid: The process ID of a running Play server PlayFramework.gitignore13/dist/: Packaged application for deployment PlayFramework.gitignore15Sources: PlayFramework.gitignore1-17
The core Scala template is lightweight, focusing on compiled classes and JVM crash logs.
*.class: Compiled JVM bytecode Scala.gitignore1*.tasty: Scala 3 intermediate representation Scala.gitignore2hs_err_pid*: JVM HotSpot crash logs Scala.gitignore6Sources: Scala.gitignore1-7
Leiningen is the project automation tool for Clojure. Its template mirrors other JVM tools but adds REPL-specific history.
/target/ and /classes/: Build outputs Leiningen.gitignore6-7.lein-repl-history: Command history from the REPL Leiningen.gitignore10.nrepl-port: Port file for network REPL connections Leiningen.gitignore13Sources: Leiningen.gitignore1-15
Delphi projects generate a high volume of binary and temporary files during compilation.
EIFGENs: Compilation directory for EiffelStudio Global/EiffelStudio.gitignore2*.dcu (Delphi Compiled Unit) and *.identcache (IDE cache).Sources: Global/EiffelStudio.gitignore1-2
While not a JVM language, Haskell is often grouped with advanced type-system languages like Scala.
.stack-work/: Build artifacts for the Stack tool Haskell.gitignore19dist and dist-*: Cabal build outputs Haskell.gitignore1-2*.hi and *.o: Interface and object files Haskell.gitignore4-5Sources: Haskell.gitignore1-24
Refresh this wiki