cialis online pharmacy generic xenical cheap cialis online cialis generic viagra online in canada buy cheap levitra online cialis without a perscription order viagra uk no prescription flagyl cheap generic levitra buying viagra in the uk cheap viagra approved cialis deltasone online buy viagra online without prescription non prescription cialis buy orlistat uk buy cialis in india prednisone 60 mg female viagra online buy viagra without prescription celebrex prescriptions buy cialis canada best prices viagra alternative to prednisone cheapest generic levitra levitra 5mg cheap viagra cialis on line buy xenical without prescription online accutane canadian health care prednisone no prescreption viagra online generic female viagra europe buy cialis low price cheap india viagra

Installing Node.js Packages And Ruby Gems In Virtualenv

When you’re using Python’s virtualenv in your project, there might come a time when you’re going to be required to use libraries in other languages. When that happens, chances are you might want to have them installed in your virtual environment as well.

This tutorial from 2general will show you how to do just that using Node.js packages and Ruby gems. They also recommend using virtualenvwrapper, which you can put in your postactivate script. First thing you have to do is to set the variables:

# node.js packages
export npm_config_prefix=$VIRTUAL_ENV
# ruby gems
export GEM_HOME=$VIRTUAL_ENV
 export GEM_PATH=""

Installing Node.js packages

If you’re going to install the Less CSS compiler in the environment, for example, just use:

$ npm install -g less

The lessc script will be symlinked into $VIRTUAL_ENV/bin, which by the way requires a recent version of Node.js:

$ echo "div { a { color: #f00; } }" > my.less
$ lessc my.less
div a {
color: #f00;
 }

And if you’re on an Ubuntu box, the easiest way to get one is the following (tested on 11.10 and 12.04):

$ sudo add-apt-repository ppa:chris-lea/node.js
$ sudo apt-get update
 $ sudo apt-get install -y npm

Installing Ruby gems

Just use:

$ gem install sass

The script will be installed inside $VIRTUAL_ENV/bin; the same as Node.js.

$ echo "div { a { color: #f00; } }" > my.scss
$ sass my.scss
div a {
 color: #f00; }

Credits to the guys at 2General for the tip!

 

Related Posts

Adding Instagram Badges to Your WordPress Profile

How to Create a Custom WordPress Registration Form with Flat UI

How to Create A Basic Hipster-Style Layout

How to Style Nav Links Using Floats With HTML5 and CSS3