rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 193 forks source link

Could not install therubyracer on Raspberry Pi #293

Closed BennyLi closed 9 years ago

BennyLi commented 10 years ago

Hello, i am trying to setup OpenProject 3.0 on a Raspberry Pi Model B. But currently i'm stuck at therubyracer gem. Here is what i have done so far:

I installed RVM, Ruby 2.1.0 and bundler. Then i tried to bundle install gems for OpenProject 3.0 beta which runs on Rails 3.2. Setup instructions

Inside of the Gemfile of OpenProject 3.0 there is also therubyracer dependency. But here i run into trouble.

First of all libv8 doesn't compile (the known ia32 error). I managed this by installing libv8 system library (libv8-3.8.9.20_3.8.9.20-2_armhf.deb) and header (libv8-dev_3.8.9.20-2_armhf.deb, see debian ftp: http://ftp.de.debian.org/debian/pool/main/libv/libv8/) and then compile libv8 gem by myself with gem install libv8 -v '3.11.8.17' -- --with-system-v8

But therubyracer gem won't install... Here is the error output:

   /home/pi/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb 
checking for main() in -lpthread... yes
checking for v8.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling script.cc
compiling array.cc
compiling rr.cc
compiling object.cc
compiling backref.cc
compiling function.cc
compiling string.cc
compiling stack.cc
compiling constraints.cc
compiling message.cc
compiling invocation.cc
compiling external.cc
compiling template.cc
compiling trycatch.cc
compiling v8.cc
compiling heap.cc
compiling context.cc
context.cc: In static member function ‘static VALUE rr::Context::IsCodeGenerationFromStringsAllowed(VALUE)’:
context.cc:93:30: error: ‘class v8::Context’ has no member named ‘IsCodeGenerationFromStringsAllowed’
context.cc:94:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [context.o] Fehler 1

make failed, exit code 2

Gem files will remain installed in /home/pi/.rvm/gems/ruby-2.1.0/gems/therubyracer-0.11.4 for inspection.
Results logged to /home/pi/.rvm/gems/ruby-2.1.0/extensions/armv6l-linux/2.1.0/therubyracer-0.11.4/gem_make.out
An error occurred while installing therubyracer (0.11.4), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.11.4'` succeeds before bundling.

I've red about the problem of getting therubyracer to work on the Rasperry Pi. But i did not found a solution yet. I even tried to compiile the sources from github (v.0.12.1). That doesn't work either.

So i like to help (and to get it running for me). What can i do? Or do you have a solution for this already?

Best regards, Ben

kaushalsanghavi commented 10 years ago

I've faced this same issue. Your best bet is to downgrade the version of the rubyracer that you're using for your project. v0.11.0 worked for us.

r3k2 commented 9 years ago

im having the same issue... how did you got it to work? I even try with 0.11.0 gem install therubyracer -v 0.11.0 no luck! :( I want to run my rails app on my rasbperry pi.

cowboyd commented 9 years ago

You should try -v 0.12