1
0
Fork 0
mirror of https://github.com/rubyjs/therubyracer synced 2023-03-27 23:21:42 -04:00

Try to load the (maybe) active libv8 gem on build

Sometimes your rubygems install can get into a 
state where the gem activation succeeds, but the
require will ultimately fail. Make sure that the
gem is actually available before trying to build
with it.
This commit is contained in:
Charles Lowell 2012-06-25 12:24:30 -05:00
parent 4e6f848d4d
commit 8d1e348de0

View file

@ -4,6 +4,7 @@ LIBV8_COMPATIBILITY = '~> 3.11.8'
def have_rubygem_libv8?
require 'rubygems'
gem 'libv8', LIBV8_COMPATIBILITY
require 'libv8'
return true
rescue Gem::LoadError
return false