ace.config.set('basePath', '/assets/ace');
<% Dir[File.dirname(__FILE__) + '/ace/worker-*.js'].each do |file| %>
<% worker = File.basename(file, '.js').sub(/^worker-/, '') %>
ace.config.setModuleUrl("ace/mode/<%= worker %>_worker", "<%= asset_path "ace/worker-#{worker}.js" %>");
<% end %>
<% Dir[File.dirname(__FILE__) + '/ace/mode-*.js'].each do |file| %>
<% mode = File.basename(file, '.js').sub(/^mode-/, '') %>
ace.config.setModuleUrl("ace/mode/<%= mode %>", "<%= asset_path "ace/mode-#{mode}.js" %>");
<% end %>

ace.config.set('basePath', '/assets/ace');
<% Dir[File.dirname(__FILE__) + '/ace/worker-*.js'].sort { |file1, file2| file1 <=> file2 }.each do |file| %>
<% worker = File.basename(file, '.js').sub(/^worker-/, '') %>
ace.config.setModuleUrl("ace/mode/<%= worker %>_worker", "<%= asset_path "ace/worker-#{worker}.js" %>");
<% end %>
<% Dir[File.dirname(__FILE__) + '/ace/mode-*.js'].sort { |file1, file2| file1 <=> file2 }.each do |file| %>
<% mode = File.basename(file, '.js').sub(/^mode-/, '') %>
ace.config.setModuleUrl("ace/mode/<%= mode %>", "<%= asset_path "ace/mode-#{mode}.js" %>");
<% end %>

Sort the Ace files so that the order is always the same
Sort the Ace files so that the order is always the same
