.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)

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.