Como executar o Node.js no Mac após instalá-lo com sucesso com gem?

0

No Mac OSX Yosemite, instalei o nó com êxito:

# sudo gem install node
Fetching: eventmachine-1.0.7.gem (100%)
Building native extensions.  This could take a while...
Successfully installed eventmachine-1.0.7
Fetching: node-0.0.2.gem (100%)
Successfully installed node-0.0.2
Parsing documentation for eventmachine-1.0.7
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/fastfilereaderext.bundle, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/rubyeventmachine.bundle, skipping
Installing ri documentation for eventmachine-1.0.7
Parsing documentation for node-0.0.2
Installing ri documentation for node-0.0.2
2 gems installed

E eu vejo isso na lista de gemas instaladas:

# gem list --local

*** LOCAL GEMS ***

activesupport (3.2.17)
bigdecimal (1.2.0)
CFPropertyList (2.2.8)
claide (0.7.0, 0.5.0)
cocoapods (0.35.0, 0.32.1)
cocoapods-core (0.35.0, 0.32.1)
cocoapods-downloader (0.8.1, 0.5.0)
cocoapods-plugins (0.3.2)
cocoapods-trunk (0.4.1)
cocoapods-try (0.4.3, 0.2.0)
colored (1.2)
escape (0.0.4)
eventmachine (1.0.7)
fuzzy_match (2.0.4)
i18n (0.7.0, 0.6.9)
io-console (0.4.2)
json (1.7.7)
json_pure (1.8.1)
libxml-ruby (2.6.0)
minitest (5.5.1, 4.3.2)
molinillo (0.1.2)
multi_json (1.9.2)
nap (0.8.0, 0.7.0)
netrc (0.7.8)
node (0.0.2)
nokogiri (1.5.6)
open4 (1.3.3)
psych (2.0.0)
rake (0.9.6)
rdoc (4.0.0)
sqlite3 (1.3.7)
test-unit (2.0.0.0)
thread_safe (0.3.4)
tzinfo (1.2.2)
xcodeproj (0.20.2, 0.16.1)

No entanto, quando eu tento usá-lo (o mesmo arquivo app.js roda bem no Windows 7) - o intérprete Node.js não foi encontrado:

# node app.js
-bash: node: command not found
# sudo node app.js
sudo: node: command not found

Além disso, não há um arquivo node em / usr / local / bin .

Por favor me avise, como posso começar a usar o Node.js instalado?

Tenho a sensação de que apenas um pouquinho está faltando aqui.

    
por Alexander Farber 17.04.2015 / 14:45

1 resposta

1

This gem is a joke with all this hype with the node.js project.

It only includes the eventmachine gem and adds a new alias to it.

link

executar

sudo apt-get update

sudo apt-get install nodejs

ou

brew update

brew install node
    
por 24.06.2015 / 09:36