Gem Install Therubyracer' Fails on MAC Os X Lion

`gem install therubyracer` fails on Mac OS X Lion

This worked for me:

$ gem uninstall libv8
$ gem install therubyracer

(A big thanks to http://www.ruby-forum.com/topic/4306127)

gem install therubyracer -v '0.10.2' on osx mavericks not installing

If you decide to use a newer therubyracer gem version, you will no longer have this problem

Otherwise:

brew tap homebrew/dupes # Thanks Tom
brew install apple-gcc42

export CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2
export CXX=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/g++-4.2
export CPP=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/cpp-4.2

brew uninstall v8

gem uninstall libv8

gem install therubyracer -v '0.10.2' # specify version

MacOSX Lion run server without therubyracer gem

I had a similar problem installing Rails on a Rapsberry Pi because therubyracer has no package for arm processors.

It can be solved installing node.js which you can download here: https://nodejs.org/download/

After you installed it you can remove therubyracer from your Gemfile and run bundle again. After you did that everything should be fine...

// You also need to add this line to your Gemfile:

gem 'execjs'

Then run bundler again.

Its described here: http://ajacevedo.com/2013/using-node-js-as-a-rails-javascript-runtime/

// IN your case the Less Gem requires therubyracer not rails itself. So its a gem specific problem. It has been discribed here: https://github.com/seyhunak/twitter-bootstrap-rails/issues/336

One of the guys seemed to solve it this way:

...
Anyways, removed both gems, 'therubyracer' and 'less-rails-bootstrap'. Now using 'bootstrap-sass'.

Cannot install gem 'therubyracer' in OS X Mavericks

Sorry, I don't know what fixed my problem. I was trying everything and it got fixed.

I installed gcc47 using macports, not homebrew.(it took nearly 2 days to install in my slow 512kbps connection)

Then I changed the version of therubyracer to '0.12.0'

I don't know which got my problem fixed.

therubyracer install error

You can use the Libv8 from the brew instead of the one from gem. You can do that by following commands:

$ gem uninstall libv8
$ brew install v8
$ gem install therubyracer

Error when running bundle install on mac - therubyracer failing to install

Do this:

$ gem uninstall libv8 # ignore if this fails
$ gem install libv8 -v 3.16.14.3 -- --with-system-v8 # 2013-08 x86_64-darwin-12 (32.6 MB)

Also edit your Gemfile and force a newer version of therubyracer

gem "therubyracer", "~> 0.12"

Then try again:

$ bundle update

Installing libv8 gem on OS X 10.9+

This is due to the fact that OS X 10.9+ is using version 4.8 of GCC. This is not supported officially in older versions of libv8 as mentioned in the pull request (https://github.com/cowboyd/libv8/pull/95). Please try bumping up the version of libv8 in your Gemfile (or) a bundle update should suffice. Hope this helps.

From the libv8 README

Bring your own V8

Because libv8 is the interface for the V8 engine used by therubyracer, you may need to use libv8, even if you have V8 installed already. If you wish to use your own V8 installation, rather than have it built for you, use the --with-system-v8 option.

Using RubyGems:

gem install libv8 [-v YOUR_VERSION] -- --with-system-v8

Using Bundler (in your Gemfile):

bundle config build.libv8 --with-system-v8

Please note that if you intend to run your own V8, you must install both V8 and its headers (found in libv8-dev for Debian distros).

Bring your own compiler

You can specify a compiler of your choice by either setting the CXX environment variable before compilation, or by adding the --with-cxx= option to the bundle configuration:

bundle config build.libv8 --with-cxx=clang++

Edit:

If this issue is brought on by therubyracer, try the following as suggested by rider_on_rails here:

gem uninstall libv8

gem install therubyracer -v YOUR_RUBY_RACER_VERSION

gem install libv8 -v YOUR_VERSION -- --with-system-v8

bundle install / update: libv8 (therubyracer) installation fails (with native extensions)

Try that one for a little while:

gem 'therubyracer'
gem 'libv8', '3.16.14.3'

Should help.

Also it's better with a new bundler: gem install bundler --pre



Related Topics



Leave a reply



Submit