I
I
Ilya Lozer2014-10-29 13:20:05
Ruby on Rails
Ilya Lozer, 2014-10-29 13:20:05

How to install rubyracer correctly (problem in libv8)?

Problem:
When you run the bundle, gems are installed in order, and letter_opener swears that there is no libv8.
I tried to install it via gem install libv8, it began to swear:

Compiling v8 for ia32
Using python 2.7.3
Using compiler: /usr/bin/c++ (GCC version 4.6)
/home/ilya/.rvm/gems/[email protected]/gems/libv8-3.16.14.7/ext/libv8/builder.rb:28:in `make_flags': undefined method `include?' for nil:NilClass (NoMethodError)
  from /home/ilya/.rvm/gems/[email protected]/gems/libv8-3.16.14.7/ext/libv8/builder.rb:56:in `block in build_libv8!'
  from /home/ilya/.rvm/gems/[email protected]/gems/libv8-3.16.14.7/ext/libv8/builder.rb:49:in `chdir'
  from /home/ilya/.rvm/gems/[email protected]/gems/libv8-3.16.14.7/ext/libv8/builder.rb:49:in `build_libv8!'
  from /home/ilya/.rvm/gems/[email protected]/gems/libv8-3.16.14.7/ext/libv8/location.rb:24:in `install!'
  from extconf.rb:7:in `<main>'

I dug up on these errors in Google that I need to add --with-system-v8, after which it was successful.
Launched further bundle, letter_opener installed, went further, but fell on rubyracer,
Using python 2.7.3
Using compiler: /usr/bin/c++ (GCC version 4.6)
/home/ilya/.rvm/gems/ruby-2.1.2/gems/libv8-3.16.14.7/ext/libv8/builder.rb:28:in `make_flags': undefined method `include?' for nil:NilClass (NoMethodError)

What I haven’t tried already, I can’t google it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Kunin, 2014-11-06
@ammet

Solution from here: stackoverflow.com/questions/24081473/how-to-instal...
Works on Centos
git clone https://github.com/cowboyd/libv8.git
cd libv8
bundle install
bundle exec rake clean build binary
gem install pkg /libv8-3.16.14.3-x86_64-darwin-12.gem #here is most likely a buffer file of a different version and architecture, respectively, and the name will be different.

V
Valentin, 2014-10-29
@nowfine

about! th I know.
in Gemfile write

gem "execjs"
gem "therubyracer"

and then do

V
vsuhachev, 2014-10-29
@vsuhachev

sudo apt-get install nodejs
and does not take a steam bath with the assembly manually

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question