Skip to content

Uncaught ReferenceError: JST is not defined #59

@svishniakov

Description

@svishniakov

I've caught JST is not defined error in a browser console after new project creation. Just wanted to have some experiments with skim.

Gemfile

gem 'rails', '~> 5.1.2'
gem 'sqlite3'
gem 'puma', '~> 3.7'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.2'
gem 'turbolinks', '~> 5'
gem 'jbuilder', '~> 2.5'
gem 'slim-rails'
gem 'jquery-rails'
gem 'slim-rails'
gem 'skim'
gem 'therubyracer'

application.js

//= require jquery
//= require jquery_ujs
//= require rails-ujs
//= require turbolinks
//= require skim
//= require_tree .

books.coffee file

skim = ->
  $("#greeting").html JST["books"]({world: "World"})

$(document).ready(skim)

books.jst.skim in the same location where books.coffee files located
p Hello #{@world}!

I would appreciate any advise on how to solve the issue and add skim to my application correctly?

Regards,
Sergey

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions