安装therubyracer时出错

Tam*_*iev 2 ruby-on-rails ruby-on-rails-3 therubyracer

捆绑安装我的更新时收到错误.这是我的gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.1'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'mysql2'
gem 'libv8'
gem 'therubyracer'
gem 'haml'
gem 'haml-rails'
gem 'sass-rails',   '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'compass-rails'
gem 'chosen-rails'
gem "bootstrap-wysihtml5-rails", "~> 0.3.1.10"
gem 'hpricot'
gem "rest-open-uri", "~> 1.0.0"
gem 'jquery-datatables-rails', github: 'rweng/jquery-datatables-rails'

# Gems used only for assets and not required
# in production environments by default.
group :assets do

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

  gem 'uglifier', '>= 1.0.3'
  gem "commonjs", "~> 0.2.6"
  gem "less", "~> 2.2.2"
  gem "less-rails", "~> 2.2.6"
end


gem 'jquery-rails'
gem 'simple_form'
gem 'client_side_validations'
gem 'client_side_validations-simple_form'

# To use ActiveModel has_secure_password
gem 'bcrypt-ruby', '~> 3.0.0'
Run Code Online (Sandbox Code Playgroud)

这是在生产中运行bundle install命令后得到的错误:

安装therubyracer(0.11.0)时发生错误,Bundler无法继续.gem install therubyracer -v '0.11.0' 在捆绑之前确保成功.

Rya*_*yan 8

我做了以下对我有用的事情:

  • 我从我的Gemfile中注释掉了therubyracer
  • 跑了"捆绑安装"
  • 使用"gem install therubyracer"安装了最新版本的therubyracer(在撰写本文时为0.11.2)
  • 我取消注释了therubyracer,把它放回我的Gemfile中
  • 再次运行"捆绑安装",一切正常