New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find a JavaScript runtime #885
Comments
Yes, it's therubyracer gem that was removed. |
@resetexistence Can we use something other than therubyracer for this? |
Note, mac users don't need this because mac os already have js runtime out of the box. |
The change that @ugisozols made fixed the problem on Ubuntu. Thanks :) |
This comment https://github.com/resolve/refinerycms/pull/878#issuecomment-1811801 by @michaelklishin suggests that you can drop therubyracer in favor of relying on node.js being available which provides linux users with a js runtime. I haven't tested this myself but I can give it a shot |
@resetexistence that is if you have node.js installed (like Travis). Otherwise user have to install node.js separately... |
You can move therubyracer out to a separate gem group and use |
How complicated is node.js to install? |
I think the best solution is to just wrap therubyracer gem dependency in an unless ENV['TRAVIS'] block and ensure that the node.js cookbook is run on the Travis worker. |
|
@michaelklishin what about on linux? |
It's pretty easy to clone from git and install from source - it's also precompiled and in most package management systems |
Maybe we can drop therubyracer altogether and leave it to the user to decided what to install. Just like rails do - you have to figure it out yourself as you are just presented with single message - "Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes." |
on linux getting a reasonably recent Node version (0.4.x) package is a pain. If you are not running Ubuntu or Debian, twice the pain. Building from source is very easy. Anyway, |
I agree with @ugisozols, it's a pretty friendly error message with a link to a helpful way to grab a JS runtime for your OS |
For future googling generations: travis-ci cookbooks have Node.js .deb package for Debian and Ubuntu (0.4.8 today and will be kept up-to-date in the future). |
Is there any way we can be more helpful to developers who hit this error? Like can we wrap it with something like: "This is not an issue with Refinery, you merely have to specify your favourite runtime; here's how to solve this:" (I don't know if this is even possible) This is because otherwise we'll keep having issues filed because people will think it's a "bug we don't know about" rather than the way that Rails works. |
@parndt I personally agree with that idea but because Rails core forces this asset pipeline stuff down everyone's throat (they say they don't but we all see what happens in reality), it will be very well known very soon. I even expect there to be another drama, à la rbenv. With travis-ci cookbooks being 100% open source, we will do our best to help Ubuntu and Debian users to get .deb package that is up to date, or even the whole Chef cookbook. You can point people to our repo. Homebrew keeps OS X users covered. Windows will have Node at some point, too. |
@michaelklishin thanks for the help with this. Who wants to patch it? ;-) |
@parndt do we really need to patch it? It's not something that Refinery CMS is causing and if you type that error line in google the first result provides a "fix" for it. Apparently windows has js runtime out of the box too so it's just linux users that are in "trouble" :) |
When I posted this, it was because things suddenly broke on my machine (Ubuntu) after getting a fresh copy of the master branch. I didn't realize this is more of a Rails issue than a Refinery one. Perhaps it'd be best to have therubyracer in the Gemfile but commented out with a short explanation for why it might be needed? On one hand, Rails developers will be familiar with this "problem" soon enough. On the other hand, Refinery should be user friendly even for noobies and non-rails devs. That's just my 2 cents. :) |
so far I favor the "skip dependency when |
You can be a Refinery contributor by sending a pull request. ;-) Join this wonderful list: https://github.com/resolve/refinerycms/contributors |
So I removed it. |
Thanks |
With a brand new checkout of master:
bundle install
rake db:migrate
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
saw something about therubyracer in the commits recently, perhaps this is still needed?
The text was updated successfully, but these errors were encountered: