Jon Welzel
Jon Welzel

Reputation: 25

Rails app can't find my Gem's javascript

I wrote a gem and installed it in my Rails app, including the following configuration inside the app. Problem is that the Rails app does not find the Gem's Javascript files and Sprockets gives me errors such as "Sprockets::FileNotFound". Any clues as to what I'm doing wrong here?

Upvotes: 1

Views: 352

Answers (1)

Yossi Shasho
Yossi Shasho

Reputation: 3640

Your gem must contain an engine class which inherits from Rails::Engine for Sprockets to include it in its scan path. See http://guides.rubyonrails.org/asset_pipeline.html#adding-assets-to-your-gems

Upvotes: 1

Related Questions