I am studying RoR and I am setting this virtual machine to "deploy" RoR and I got stuck in the Node.js installation.
I am using Ubuntu 12.04 and I followed this step of this guide:
$ sudo apt-get install nodejs
and set it in your $PATH.
What does it mean, "set to my $PATH"?
I've been searching for it on google in the last couple of hours and all solutions are different, for different problems and I get no simple answer for that. Can you give a little light here?
You don't have to worry about that, the
apt-get install command will do that for you.
It adds the path to the nodejs process (usually
/usr/bin/node) to the global $PATH variable. This ensures that when you type
node in your terminal it will start the nodejs process.
If for some weird reason you cannot start it, you'll have to manually add the path to your node installation to the $PATH. You can do this by editing your
~/.bashrc file and adding:
I've been trying to install
npm and it has complained about
node not being in the path. Funnily enough,
nodejs was, but
node wasn't. I ended up solving the problem thus:
$ cd /usr/bin/
$ sudo ln -s nodejs node
npm installs without complaints.