Подтвердить что ты не робот

Libv8 требуется установить python 2 для сборки - Windows

Так вот как я пытаюсь установить libv8 в свою Windows:

D:\projects\perfstats>gem install libv8
Fetching: libv8-3.16.14.1.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing libv8:
        ERROR: Failed to build gem native extension.

        D:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/builder.rb:49:in `setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently not available (RuntimeError)
        from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/builder.rb:35:in `block in build_libv8!'
        from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/builder.rb:34:in `chdir'
        from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/builder.rb:34:in `build_libv8!'
        from D:/Ruby193/lib/ruby/gems/1.9.1/gems/libv8-3.16.14.1/ext/libv8/location.rb:24:in `install!'
        from extconf.rb:7:in `<main>'

Я установил python 2.7 и добавил его в путь:

D:\projects\perfstats>python -V
Python 2.7.3

Любые идеи, что может быть решением в этом случае?

4b9b3361

Ответ 1

Есть некоторые проблемы для решения проблемы Попробуйте запустить это: gem install libv8 -v '3.16.14.1' - --with-system-v8

Или мы их отдельно разделим в Gemfile

group :production do
 gem 'libv8', '~> 3.11.8.3'
 gem 'therubyracer', :platform => :ruby
end

И затем запустите команду bundle: пакет установки или комплект поставки - без производства

Ответ 2

У меня была такая же проблема, пытаясь установить драгоценный камень therubyracer в Windows.

Попробуйте установить пакет GitHub therubyracer_for_windows и скопируйте v8.dll и v8preparser.dll в свой ruby\bin.

Это также установит жемчужину libv8 и решит вашу проблему.