Getting error while installing therubyracer

Tamik Soziev picture Tamik Soziev · Dec 9, 2012 · Viewed 8.7k times · Source

I am receiving an error while bundle install my updates. Here is my 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'

Here is an error i am getting after running bundle install command on production:

An error occured while installing therubyracer (0.11.0), and Bundler cannot continue. Make sure that gem install therubyracer -v '0.11.0' succeeds before bundling.

Answer

Ryan picture Ryan · Jan 12, 2013

I did the following that worked for me:

  • I commented out therubyracer from my Gemfile
  • ran "bundle install"
  • installed the newest version of therubyracer using "gem install therubyracer" (at the time of writing this is 0.11.2)
  • I uncommented therubyracer to put it back in to my Gemfile
  • ran "bundle install" again and everything works