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

Can't access Middleman data files, helpers #15

Open
erosdome opened this issue Nov 7, 2016 · 0 comments
Open

Can't access Middleman data files, helpers #15

erosdome opened this issue Nov 7, 2016 · 0 comments

Comments

@erosdome
Copy link

erosdome commented Nov 7, 2016

Upon loading, I get:

undefined local variable or method `data' for #<#<Class:0x007f9913a97528>:0x007f99157d60f8>

Most of my scripts are .js.erb since I pull a lot of strings from Middleman data .yml files, so I have a lot of code like this:

var aString = "<%= data[:strings][:a_string] %>";

which works fine, except when running Jasmine-tests, as if Jasmine would not load Middleman data files. Is there a configuration setting where I can tell Jasmine to do so?

UPDATE:

It seems I also can't use Middleman helpers. I receive the same error when trying to use a Middleman helper defined in Middleman's config.rb file.

@erosdome erosdome changed the title Can't access Middleman data files Can't access Middleman data files, helpers Nov 7, 2016
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

No branches or pull requests

1 participant