Some clarification: On 29. september 2014 at 2:04 PM, "Joseph Pearson" wrote:
Ruby needs an interface into the JavaScript runtime, which libv8 provides. Node is a different concept entirely (though it too needs such an interface, which internally V8 provides). You can see this here: https://github.com/joseph/ruby-clean-css/blob/master/lib/ruby-clean-css/compressor.rb#L41-L45 If you have a Node project, you may just want the Clean-CSS JavaScript library. If you have a Ruby project, you want Ruby-Clean-CSS and its deps. Node itself does not act as a JS engine. Cheers, â J Thanks. O.D. On 29. september 2014 at 1:12 PM, "Edho Arief" wrote:On Mon, Sep 29, 2014 at 9:40 PM, wrote: > Hi, > > Does anybody have experience compiling the Ruby libv8 JavaScript > engine (https://github.com/cowboyd/libv8) on OpenBSD 5.5? > > It says it can't find a supported compiler despite repeated attempts > to point it to `gcc` or `g++` 4.8.2 or 4.6.4 > (https://github.com/cowboyd/libv8#bring-your-own-compiler), either via > the environment variable below or through symlinking: > > % export cxx=/usr/local/bin/eg++ the correct variable is CXX (and make sure to install gmake). Also it's better to just install nodejs if what you need is execjs' javascript runtime. -bash-4.2$ CXX=/usr/local/bin/eg++ GEM_HOME="$HOME/app/rubygems" gem install libv8 Building native extensions. This could take a while... ...a long time with hopefully expected result but I stopped because it's running in a low end box... alternatively, install libv8 package and tell gem installer to use system libv8 library as per documentation: -bash-4.2$ GEM_HOME="$HOME/app/rubygems" gem install libv8 -- --with-system-v8 Fetching: libv8-3.16.14.7.gem (100%) Building native extensions with: '--with-system-v8' This could take a while... Successfully installed libv8-3.16.14.7 Parsing documentation for libv8-3.16.14.7 Installing ri documentation for libv8-3.16.14.7 Done installing documentation for libv8 after 2 seconds 1 gem installed

