The goal of this page is to equip you with locally installed packages. For Windows, we suggest using chocolatey for package installs. Look here for information on how to install chocolately for Windows operating systems.

Node.js

Linux

Installing Node.js with NVM

  • The installation instructions here say to pipe the install script to bash. Do not do that. Read what is in the script and then run it with sh.

    curl <https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh> -o install.sh 
    $EDITOR install.sh 
    sh install.sh 
    
  • $EDITOR should be set to vim, emacs, and so on. but if it is not any of those can be substituted in

  • Install Node.js

    nvm install stable # will install the latest stable version 
    nvm install <version> # will install the specified version 
    nvm ls-remote # to list availableversions 
    
  • Tell NVM which version you want to use

    nvm alias default <version>
    

Installing packages with NPM

npminstall # will install all packages specified in package.json 

npm install <package> # will install the package 
npm install sequelize 

npm install -g <package> # will install the package as a global that can be called via command line 
npm install -g less 

Windows

Installing Node.js with NVMW

  • Open the Powershell and type the following output (force only necessary if unsuccessful without)

    installnvm

  • Check node and npm version for proof of successful installation

    node -v
    npm i -g npm 
    

Installing packages with NPM

  • See Linux instructions

Ruby

Linux

Installing rbenv

git clone <https://github.com/sstephenson/rbenv.git> ~/.rbenv 
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc # to add it to your path 
echo 'eval "$(rbenv init -)"' >> ~/.bashrc # to enable it 
type rbenv # should return 'rbenv is a function' 

Installing Ruby with rbenv

git clone  <https://github.com/sstephenson/ruby-build.git> ~/.rbenv/plugins/ruby-build # to install the ruby-build plugin 
    
rbenv install <version> # installs specified version of ruby 
    
rbenv global <version> # tells rbenv what version to use by default 

Installing RVM and Ruby

  • Read this before you choose to go with RVM

    gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 # install authors GPG key 
    curl -sSL  <https://get.rvm.io>  > rvm-install.sh 
    $EDITOR rvm-install.sh 
    bash -s stable --ruby < rvm-install.sh # to install RVM and the latest stable version of Ruby 
    

Installing packages with rbenv or RVM

gem install bundler # install bundler to install other packages 

bundle install # installs everything specified in Gemfile 

bundle install <package> # installs specified package 
bundle install sequel 
  • Some packages may install themselves as binaries that can be called from the command line, others will be installed as libraries.

Windows

Installing Ruby with RVM and Cygwin

  • Open Powershell and type the following command

    choco install ruby 
    
  • For more information about the ruby installation via chocolatey please refer to [this page] (https://chocolatey.org/packages/ruby)

Installing packages with RVM

  • See Linux instructions

Python

Linux

Creating a virtualenv

    virtualenv --python=/usr/bin/python3  <directory>
    virtualenv --python=/usr/bin/python3 venv 

Using a virtualenv

source <directory> /bin/activate # activates virtualenv 
deactivate </code> # deactivates virtualenv 

Installing packages with Pip

pip install <package> # installs specified package 
pip install -r  <file>  # installs packages specified in text file 

pip install sqlalchemy 

Windows

Adding virtualenv to Path

  • Change your PATH variable to include virtualenv by opening up Control Panel -> User Accounts -> User Accounts -> Change my environment variables

  • Create a new PATH variable by clicking the new button

  • The new path should be set to the old path, plus the Python 2 and 3 scripts directory

Creating a virtualenv

    virtualenv --python=C:\Python33\python.exe <directory>
    virtualenv --python=C:\Python33\python.exe venv 

Using a virtualenv

<directory> \Scripts\activate # activates virtualenv 
deactivate # deactivates virtualenv 

Installing packages with Pip

pip install <package> # installs specified package 
pip install -r <file> # installs packages specified in text file 

pip install sqlalchemy 

PHP

Linux

Installing Composer

  • Create local directory for binaries

    • This should be named bin by convention, but as long as it is in the path it can be named anything

      mkdir ~/bin

  • Download and install composer

    php -r "readfile(' <https://getcomposer.org/installer> ');" | php 
    

Installing packages with Composer

composer require  <package> 
composer require propel/propel ~2.0@dev 

Updating packages with Composer

composer update 

Windows

Installing Composer

Installing packages with Composer

composer require <package>
composer require propel/propel ~2.0@dev 

Updating packages with Composer

composer update