【问题标题】:can't install gem 'twitter-bootstrap-rails'无法安装 gem 'twitter-bootstrap-rails'
【发布时间】:2012-05-31 19:35:22
【问题描述】:

尝试捆绑安装时出现错误。我在空项目中遇到同样的错误。

 Installing libv8 (3.3.10.4) with native extensions
   Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    C:/Ruby192/bin/ruby.exe extconf.rb
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of
   necessary libraries and/or headers.  Check the mkmf.log file for more
       details.  You may need configuration options.

  Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=C:/Ruby192/bin/ruby
    Checking for Python...Unable to build libv8: Python not found!


    Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.3
 .10.4 for inspection.
   Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4/ext/libv8/g
  em_make.out
   An error occured while installing libv8 (3.3.10.4), and Bundler cannot continue.

    Make sure that `gem install libv8 -v '3.3.10.4'` succeeds before bundling.

这是我的 Gemfile: 来源“https://rubygems.org”

  gem 'rails', '3.2.2'
  gem 'bootstrap-sass', '2.0.0'
  # Bundle edge Rails instead:
  # gem 'rails', :git => 'git://github.com/rails/rails.git'
   gem'devise'

  gem 'mysql2'

group :deployment do
 gem 'pg'
end

gem '活跃商家'

Gems used only for assets and not required

默认在生产环境中。 组:资产做 宝石'twitter-bootstrap-rails' gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1'

# See https://github.com/sstephenson/execjs#readme for more supported runtimes

# gem 'therubyracer'

 gem 'uglifier', '>= 1.0.3'
end

  gem 'jquery-rails'

【问题讨论】:

  • 目前没有希望,因为 v8 不会在 windows 上构建。您可能还想要其中一个或另一个:bootstrap-sass、twitter-bootstrap-rails

标签: ruby rubygems gem twitter-bootstrap


【解决方案1】:

libv8 需要安装 Python 并将其添加到 Windows 路径中。

  • 步骤
    • 下载安装Python27
    • 右击计算机->属性->高级设置->环境变量
    • 在“系统变量”下找到路径并选择编辑
    • 添加“c:\Python26;”

注意:我必须重新启动 Aptana 才能识别新的 Python 路径。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-19
    • 2019-09-09
    • 1970-01-01
    • 1970-01-01
    • 2021-01-31
    相关资源
    最近更新 更多