I was following pluralsight's tutorial on learning React using react-rails gem.

On the Add new item step, I followed its code but encountered "Only a ReactOwner can have refs" error in the javascript console of browser.

react error wtf

Turns out there was another copy of react was loaded in app/assets/javascripts/server_rendering.js .

Removing this line from server_rendering.js resolved the error.

//= require react-server

Phew.