class ReactOnRails::ServerRenderingPool::RubyEmbeddedJavaScript

def file_url_to_string(url)

def file_url_to_string(url)
  response = Net::HTTP.get_response(URI.parse(url))
  content_type_header = response["content-type"]
  match = content_type_header.match(/\A.*; charset=(?<encoding>.*)\z/)
  encoding_type = match[:encoding]
  response.body.force_encoding(encoding_type)
rescue StandardError => e
  msg = "file_url_to_string #{url} failed\nError is: #{e}\n\n#{Utils.default_troubleshooting_section}"
  raise ReactOnRails::Error, msg
end