title: JSON::ParserError in ... unexpected token at '../../test.json' - RUBY ON RAILS
body: <p>I've been stuck on this for a while now.
  I have my JSON (test.json) :</p>
  <pre><code>[
  {
      &quot;title&quot; : &quot;Star Wars&quot;,
      &quot;Durée&quot; : &quot;3h&quot;,
      &quot;Date&quot; : &quot;6 Mars&quot;,
      &quot;Ratio&quot; : &quot;4.5/5&quot;
  },
  {
      &quot;title&quot; : &quot;Top Gun&quot;,
      &quot;Durée&quot; : &quot;2h&quot;,
      &quot;Date&quot; : &quot;17 Mai&quot;,
      &quot;Ratio&quot; : &quot;4.3/5&quot;
  }]
  </code></pre>
  <p>I have my controller (food_controller.rb) :</p>
  <pre><code>class FoodController &lt; ApplicationController
  
  def index
  
      require &quot;json&quot;
      file = File.join &quot;../../test.json&quot;
      data = JSON.parse(file)
      
  end
  </code></pre>
  <p>end</p>
  <p>And i have this error :
  <a href="https://i.stack.imgur.com/mVbUp.png" rel="nofollow noreferrer">enter image description here</a></p>