009 Package Managers

03 Aug 2012

Package manager is a collection of tools for installing, upgrading, configuring and removing software packages in a computer. We will explore some commonly used ones such as RubyGems for ruby, Pip for python, Composer for php and NPM for node.js.

Download video: mp4

Sample code: Github

Tools used:

  1. npm for node.js with example package nide text editor
  2. rubygems for ruby with example package sass css preprocessor
  3. pip for python with example package markdown for python
  4. composer for php with example package mustache for php
  5. Command line with [Terminal](http://en.wikipedia.org/wiki/Terminal(OSX)

Commands for Packager managers

Run these command in the command line.

npm composer pip rubygem
Language node -v php --version python --version ruby -v
Version npm --version composer --version pip --version gem -v
Location of the program file which npm which composer which pip which gem
List of all packages installed globally npm ls -g composer show
--installed
(locally)
pip freeze gem list
Info about a package npm show
[package-name]
composer show
[package-name]
gem list
[package-name]
Install a package npm install
[package-name] -g
composer require
[package-name]

and run composer install
pip install
[package-name]
gem install
[package-name]
Uninstall a package npm uninstall
[package-name] -g
edit composer.json
and run composer update
pip uninstall
[package-name]
gem uninstall
[package-name]
Outdated packages npm -g outdated composer update --dry-run gem outdated
Updated packages npm -g update
[package-name]
composer update pip install
--upgrade [package-name]
gem update
[package-name]
Help npm help composer help pip help gem help

Resources on Package Managers

npm composer pip rubygem
Download & Install install node.js and npm for node install globally for php.
edit the php.ini file if needed
install pip for python install rubygems for ruby
Documentation doc doc doc guides
Browse for packages npm packagist pip rubygems
Other links tour of npm package management

Build Link of this Episode

Nettuts+ is a site aimed at providing tutorials for web development and design with editor Jeffrey Way and many other talented people.

Credits

Thanks to Uzyn and Mic for advise on php package managers