Skip to content

Instantly share code, notes, and snippets.

@BrianPurgert
Last active June 9, 2024 02:32
Show Gist options
  • Save BrianPurgert/ff700602beb2782cd5cbef8c03f88afc to your computer and use it in GitHub Desktop.
Save BrianPurgert/ff700602beb2782cd5cbef8c03f88afc to your computer and use it in GitHub Desktop.
default install locations of dependencies, most popular version managers, and popular packages along with their equivalents.
Ruby JavaScript Rust
Bundler npm Cargo
Manages gem dependencies for Ruby projects Manages packages for JavaScript projects Manages packages and dependencies for Rust projects
Gems Packages/Modules Crates
Packages of Ruby programs and libraries Packages of JavaScript programs and libraries Packages of Rust programs and libraries
Gemfile package.json Cargo.toml
Specifies the gem dependencies for a Ruby project Specifies the dependencies and scripts for a JavaScript project Specifies the dependencies and configurations for a Rust project
Gemfile.lock package-lock.json Cargo.lock
Records the exact versions of gems installed Records the exact versions of packages installed Records the exact versions of crates installed
Rake Gulp/Grunt Cargo tasks
A build automation tool written in Ruby, similar to Make Build automation tools for JavaScript Integrated build automation in Cargo using commands like cargo build, cargo test, etc.

Default Behaviors

Ruby (Bundler)

  • Default Install Location: vendor/bundle (when using bundle install --path vendor/bundle)
  • Automatically installs missing gems listed in the Gemfile.
  • Ensures all gem dependencies are met and consistent with the Gemfile.lock.
  • Allows creating a consistent environment across different machines by using the same versions of gems.

JavaScript (npm)

  • Default Install Location: node_modules
  • Automatically installs all dependencies listed in the package.json.
  • Ensures consistency across environments using package-lock.json by locking the dependency tree.
  • Supports running scripts defined in the package.json for tasks like testing and building.

Rust (Cargo)

  • Default Install Location: target directory for compiled outputs and .cargo/registry for downloaded crates.
  • Automatically downloads and compiles dependencies listed in Cargo.toml.
  • Ensures consistency across builds using Cargo.lock by locking the dependency tree.
  • Provides built-in commands for building, testing, and running projects (cargo build, cargo test, cargo run).

Popular Version Managers

Ruby JavaScript Rust
RVM (Ruby Version Manager) nvm (Node Version Manager) rustup
rbenv volta

Popular Packages and Equivalents

Functionality Ruby (Gems) JavaScript (Packages) Rust (Crates)
Web Framework Rails Express Rocket
Testing RSpec Jest Cargo test
HTTP Client Faraday Axios Reqwest
Authentication Devise Passport jsonwebtoken
JSON Parsing Oj JSON (built-in) serde_json
Database ORM ActiveRecord Sequelize Diesel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment