I can't install therubyracer in Arch Linux x64

大城市里の小女人 提交于 2019-12-05 18:51:04

Actually, it was a little tricky.

I use my custom dotfiles, so, I have ~/.dotfiles/bin in my PATH.

I also been noticed that the issue is related to python v3 vs v2.

So, the fix was pretty easy, without break my system:

ln -s /usr/bin/python2 ~/.dotfiles/bin
reload
gem install libv8 --verbose
bundle

Leaving my Gemfile like this:

[...]
gem 'therubyracer', :require => 'v8', :platforms => :ruby
[...]

And BOOM, it worked.

Thanks for your help guys. Sorry for the delay to reply.

Cheers


EDIT

Issue was fixed in the newer therubyracer release (0.11.1).

I have the same issue in my ArchLinux. This is a known issue. the workaround that worked for my on archlinux was locking to 0.10.2, by adding following line in Gemfile

gem 'therubyracer', '0.10.2', :platforms => :ruby

I have tested this & it works atleast on 64bit. Hopefully it would work for you as well.

I would highly recommend using external Node.js (I am sure there's an official package for that) and then use sstephenson / execjs.

If you are using Rails, it already depends on ExecJS so you might just remove the dependency on therubyracer, bundle, install Node.js and you are good to go.

You need to install libv8 3.11.x to get latest versions of therubyracer. So try updating libv8 and then do bundle.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!