2015-05-22 67 views
1

你好,我特林安裝:錯誤安裝的RubyGems(DL已廢棄)

  • 寶石 'therubyracer', '〜> 0.12.2'
  • 寶石 'libv8',「〜> 3.16。 14.7'

在我的應用程序紅寶石(在Windows上)

當我執行命令

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. 

同樣的錯誤出現時,我試圖從我的終端安裝libv8的執行gem命令:

gem install libv8 -v '3.16.14.7' 

我怎樣才能解決這個問題?

回答

0

日誌內容答案。

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

您需要安裝python 2才能使用此gem。

0

阻力最小的路徑是安裝node.js並將gemfile修改爲此。

gem 'therubyracer', platform: :ruby 

然後它應該安裝就好了。這就是我的做法,我們使用Windows在我們的環境中進行開發。

+0

嗨瑞安我已經安裝了node.js並修改了Gemfile。當我執行命令包安裝時,我不收回任何錯誤,但忽略了gem文件(它不會出現在我cmd上已安裝的gem列表中) – giovaZ

+0

嘗試進行捆綁更新以從您的Gemfile –

+0

我試過了,但結果是一樣的 – giovaZ