Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Could we use therubyracer and mini_racer at the same time? #437

Closed
Roger-Tong opened this issue May 31, 2017 · 2 comments
Closed

Could we use therubyracer and mini_racer at the same time? #437

Roger-Tong opened this issue May 31, 2017 · 2 comments

Comments

@Roger-Tong
Copy link

Roger-Tong commented May 31, 2017

Now mini_racer has dependency on libv8: spec.add_dependency 'libv8', '~> 5.3'
therubyracer has dependency on libv8: gem.add_dependency 'libv8', '~> 3.16.14.15'
It cannot be used within one project at the same time from the dependency's point of view.

We used a workaround to update Gemfile.lock manually as below (~> was changed to >, and we didn't use the latest version of therubyracer):

    therubyracer (0.10.1)
      libv8 (> 3.3.10)

It make bundler to download libv8 (version: 5.3.332.38.3). But it still makes therubyracer work.
Does it mean https://github.com/cowboyd/therubyracer/blob/master/therubyracer.gemspec could be updated as gem.add_dependency 'libv8', '=> 3.16.14.15' ?

@ignisf
Copy link
Collaborator

ignisf commented Jun 1, 2017

Hi,

That's an interesting question. No -- the answer is that at this point trr and mini_racer depend on incompatible versions of V8's API. The old version of TRR you're mentioning could in theory by chance use a subset of V8's API that has survived for years though I doubt it.

Whatever the case you should really use either TRR or mini_racer because the chance that they'll ever depend on a common subset of V8's historically unstable API seem quite low.

@ignisf ignisf closed this as completed Jun 1, 2017
@Roger-Tong
Copy link
Author

Using only one runtime should be the right way. Our problem is that Less-rails has to use TTR(metaskills/less-rails#136), but we want to take advantage of mini_racer to faster our server rendering suggested by react_on_rails. So it seems using both of them is the only way for us now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants