I've looked everywhere for a solution to this problem, but unfortunately haven't found anything helpful.
Currently, I'm in the process of creating a new Ruby on Rails application and I want to start practicing using three.js. To check if it was properly required, I tried using my browser console, only to receive the error: ReferenceError: THREE is not defined
After reading through this post: Most efficient way to get a Three.js project to work in a ruby on rails app?, I expected to see some results.
I attempted adding the three.js file to the assets/javascripts folder and also used the threejs-rails gem from here: https://github.com/marvindanig/threejs-rails, but none of these solutions worked.
I made sure to require it in the asset pipeline in the application.js file:
//
//= require three
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
If anyone has any suggestions on what steps I should take next, please let me know. It seems like the main issue right now is that it's not being required correctly.
EDITED: Problem resolved. It turns out I was inheriting from the wrong controller model.