Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby on Rails - Autoprefixer doesn’t support Node v4.9.1. Update it. How to fix?

Working on a Rails app. Coworker pushed new commits to master with some new gems installed. Then I pulled the master branch to the local branch where I work on, the app breaks and displays the error on the title.

I use Ubuntu, the rest of the team use Macs.

Any ideas?

Already updated Node.js on my terminal to 10.x the current latest. But the error still display the Node v4.9.1 message.

Ref: https://github.com/ai/autoprefixer-rails/issues/137

like image 951
Ricardo Green Avatar asked Aug 20 '18 07:08

Ricardo Green


2 Answers

you can replace therubyracer by mini_racer in Gemfile just comment #gem 'therubyracer', platforms: :ruby and add gem 'mini_racer', platforms: :ruby

then simply run the command bundle install it worked in my case

like image 166
Asad Khan Avatar answered Oct 27 '22 00:10

Asad Khan


For future searchers, we on our team can only duplicate this error on Ubuntu environment.(Tried it on iOS and Ubuntu 16.04 only)

Already tried installing the latest Node.js versions, to no avail.

There is a link in my question that talks about how this is happening and how to fix it.

So the solution was by installing the mini_racer gem to your rails app.

like image 36
Ricardo Green Avatar answered Oct 26 '22 23:10

Ricardo Green