LoginSignup
25
16

More than 5 years have passed since last update.

node.jsのnpmとRubyのgem・bundlerをざっくり比較

Posted at

node.jsとRubyでは、パッケージ管理の思想が大きく違いました。
node.jsでは、パッケージをプロジェクトローカルにインストールしようとするのに対し、
Rubyでは基本的にパッケージをグローバルにインストールするように出来ていて、bundlerというgemでローカルへのインストールを提供しているようです。

node.js Ruby
パッケージのローカルへのインストール $ npm install hoge -(環境変数を色々いじると可能?)
モジュールのグローバルへのインストール $ npm install -g hoge $ gem install hoge
依存関係の定義ファイル package.json Gemfile
依存関係の解決(ローカルインストール) $ npm install $ bundle install --path vendor/bundle
依存関係の解決(グローバルインストール) - $ bundle install
25
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
25
16