.js.erb not being parsed by .erb first

I am trying to dynamically include a javascript file based on a
configuration option however I keep getting this error:

Error compiling asset application.js:
ArgumentError: wrong number of arguments (3 for 1)
(in
c:/Users/Dieter/Documents/event_calendar/vendor/assets/javascripts/event_calendar.js.erb:1)

when trying to run this code:

//<% require ‘event_calendar’ %>
//= require <%= EventCalendar.config.javascript %>-calendar

I am currently using Rails 3.1.0.rc4

Dieter L.
http://ubiety.ca

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs