我已经搜索了很多解决方案,不幸的是,它们都没有成功。 这是我运行bundle install时得到的结果:
Installing therubyracer 0.12.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/louiecubero/.rbenv/versions/2.2.4/bin/ruby -r ./siteconf20151229-3880-cwrbql.rb extconf.rb
checking for main() in -lpthread... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling constants.cc
make: g++: Command not found
make: *** [constants.o] Error 127
make failed, exit code 2
Gem files will remain installed in /home/louiecubero/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/therubyracer-0.12.2 for inspection.
Results logged to /home/louiecubero/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/therubyracer-0.12.2/gem_make.out
我使用的ruby版本是:
ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-linux]
我的rails版本是:rails 4.2.5
答案 0 :(得分:3)
它抱怨你还没有安装g ++。
我认为你需要先做一个sudo apt-get install g++