Rails 3.1 - ошибка драгоценного камня therubyracer - PullRequest
5 голосов
/ 23 октября 2011

Используя VirtualBox внутри Windows7, он имеет Ubuntu.Только что установил rails 3.1 и получил следующую ошибку при попытке связать установку с therubyracer gem.

Installing therubyracer (0.9.8) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /home/john/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
creating Makefile

make
g++ -I. -I/home/john/.rvm/gems/ruby-1.9.2-p290@rails311/gems/libv8-3.3.10.2-x86-linux/lib/libv8/v8/include -I/home/john/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux -I/home/john/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/john/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64  -Wall -g -rdynamic -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC   -o v8_date.o -c v8_date.cpp
make: g++: Command not found
make: *** [v8_date.o] Error 127


Gem files will remain installed in /home/john/.rvm/gems/ruby-1.9.2-p290@rails311/gems/therubyracer-0.9.8 for inspection.
Results logged to /home/john/.rvm/gems/ruby-1.9.2-p290@rails311/gems/therubyracer-0.9.8/ext/v8/gem_make.out
An error occured while installing therubyracer (0.9.8), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.9.8'` succeeds before bundling.

1 Ответ

27 голосов
/ 23 октября 2011

sudo apt-get install g ++

Просто чтобы быть уверенным, я также рекомендую:

sudo apt-get install build-essential

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...