简体   繁体   中英

Error installing rubygems (DL is deprecated)

Hello i'm tring to install:

  • gem 'therubyracer', '~> 0.12.2'
  • gem 'libv8', '~> 3.16.14.7'

in my application ruby (on windows)

when i execute the command

bundle install

the terminal show me this error:
C:\Sites\bootstrap>bundle install
DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/............
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.2
Using minitest 5.6.1
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Using activesupport 4.1.8
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.8
Using rack 1.5.3
Using rack-test 0.6.3
Using actionpack 4.1.8
Using mime-types 2.5
Using mail 2.6.3
Using actionmailer 4.1.8
Using activemodel 4.1.8
Using arel 5.0.1.20140414130214
Using activerecord 4.1.8
Using bundler 1.7.7
Using coffee-script-source 1.9.1.1
Using execjs 2.5.2
Using coffee-script 2.4.1
Using thor 0.19.1
Using railties 4.1.8
Using coffee-rails 4.0.1
Using commonjs 0.2.7
Using hike 1.2.3
Using multi_json 1.11.0
Using jbuilder 2.2.16
Using jquery-rails 3.1.2
Using less 2.6.0
Using tilt 1.4.1
Using sprockets 2.12.3
Using less-rails 2.7.0

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe -r ./siteconf20150522-5296-1qzvvgb.
rb extconf.rb
creating Makefile
Impossibile trovare il percorso specificato.
Impossibile trovare il percorso specificato.
Impossibile trovare il percorso specificato.
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.7/ext/libv8/b
uilder.rb:68:in `setup_python!': libv8 requires python 2 to be installed in orde
r to build, but it is currently not available (RuntimeError)
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/ext/libv8/builder.rb:52:in `block in build_libv8!'
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/ext/libv8/builder.rb:49:in `chdir'
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/ext/libv8/builder.rb:49:in `build_libv8!'
        from C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/libv8-3.16.14.
7/ext/libv8/location.rb:24:in `install!'
        from extconf.rb:7:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1
.0/gems/libv8-3.16.14.7 for inspection.
Results logged to C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/extensions/x86
-mingw32/2.1.0/libv8-3.16.14.7/gem_make.out
An error occurred while installing libv8 (3.16.14.7), and Bundler cannot
continue.
Make sure that `gem install libv8 -v '3.16.14.7'` succeeds before bundling.

the same error appears when i try to execute the gem command for the installation of libv8 from my terminal:

gem install libv8 -v '3.16.14.7'

How can i fix this issue?

Log content the answer.

Failed to build gem native extension.
....
libv8 requires python 2 to be installed in order to build, but it is currently not available (RuntimeError)

You need to install python 2 before you can use this gem.

Path of least resistance is to install node.js and modify your gemfile to this.

gem 'therubyracer', platform: :ruby

Then it should install just fine. This is how I do it, we use Windows to develop in our environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM