I made a rails project with,
rails new test_bootstrap.
succeeded.
moved to the project dir and added the gems
gem "therubyracer"
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem "twitter-bootstrap-rails"
and run
bundle install
after that, i have this error.
Installing libv8 (3.16.14.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
c:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
지정된 경로를 찾을 수 없습니다. 지정된 경로를 찾을 수
없습니다. 지정된 경로를 찾을 수 없습니다.
c:/RailsInstaller/Ruby1.9.3/lib/ruby/ge
ms/1.9.1/gems/libv8-3.16.14.3/ext/libv8/builder.rb:58:in `setup_python!': libv8 requires
python 2 to be installed in order to build, but it is currently not available (RuntimeErr
or) from c:/RailsInstaller/Ruby1.9.
3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/libv8/builder.rb:42:in `block in build_lib
v8/builder.rb:42:in `block in build_libv8!'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/lib
v8/builder.rb:40:in `chdir'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/lib
v8/builder.rb:40:in `build_libv8!'
from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ext/lib
v8/location.rb:24:in `install!'
from extconf.rb:7:in `<main>'
Gem files will remain installed in c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/l
ibv8-3.16.14.3 for inspection.
Results logged to c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.3/ex
t/libv8/gem_make.out
An error occurred while installing libv8 (3.16.14.3), and Bundler cannot
continue.
Make sure that `gem install libv8 -v '3.16.14.3'` succeeds before bundling.
sorry for some Koreans. It says, It can't find the chosen path or something like that.
and i tried to run this command
gem install libv8 -v '3.16.14.3'
throwing the same error.
Try with
gem "therubyracer", "~> 0.10.2" to Gemfile
And it will install dependent gem libv8 (3.3.10.4) and the issue of build gem native extension failure got resolve.
With homebrew this helps me to solve this error.
Seen on rubyracer Github issues.
Resolved libv8
3.16.14.7
issue using below command:gem install libv8 -v '3.16.14.7' -- --with-system-v8
And then
bundle install
successfully completed.i feel this has less to do with libv8 and more to do with therubyracer.
i received your same error while running a bundle install on a rails app. if you have encountered this similarly, try installing the gem outside of bundle like so:
gem install therubyracer
then run bundle install. i hope this works for you too.
How to resolve libv8/therubyracer issue
I encountered similar issue in which after installing libv8, error occurs installing therubyracer. Here is my solution:
-- see error installing therubyracer --
-- see error installing libv8 --
I do not think you need
therubyracer
gem on windows. It is a javascript runtime using V8 engine. Hence it is making an attempt to installlibv8
.You can safely remove the gem from your Gemfile.
Rails is happy to use which ever runtime it can find.
execjs
,nodejs
etc. are all possible options.Microsoft already embeds JScript runtime for javascript on windows, and Rails uses it. See this for more