Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprockets not loading javascript files. #67

Closed
jbravar opened this issue May 3, 2013 · 5 comments · May be fixed by #78
Closed

Sprockets not loading javascript files. #67

jbravar opened this issue May 3, 2013 · 5 comments · May be fixed by #78

Comments

@jbravar
Copy link

jbravar commented May 3, 2013

Forge User's Manual says to inline secondary javascript files with sprockets syntax:

//= require 'slider'
//= require 'tags'

$('#more .javascript .here').show();

but final code just has //= require 'slider' in it.

Is extra config required for this to function?

@audionerd
Copy link
Contributor

+1. This appears to be broken currently. Anyone have a fix?

@dstrojny
Copy link

dstrojny commented Sep 6, 2013

Thanks guys. A pull request to fix this would be welcome.

@jbravar
Copy link
Author

jbravar commented Sep 9, 2013

Looking into it.

@davides
Copy link

davides commented Sep 7, 2014

After a bit of digging I think this has to do with whether you're running Ruby 1.9.x or 2.x (though I haven't tested with an older ruby). Within sprockets, the code which processed directives depended on respond_to? searching protected methods (which it no longer did as of 2.0).

Updating the sprockets dependency fixes the issue (it doesn't depend on respond_to? anymore), but it looks like the version of forge on rubygems.org still depends on sprockets 2.0.4. The easiest solution right now is to install from the source.

@ghost ghost closed this as completed Jul 31, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@audionerd @jbravar @dstrojny @davides and others