I have a bug in my simple rails 4.2.5 application I am ruining the app on windows. I have active admin gem and was working fine up to yesterday after I followed the tutorial here to Exclude active_admin JS and CSS from loading in the Rails app. I will repeat what the tuturial says here just in case the link changes:
Create the folders app/assets/javascripts/admin and app/assets/stylesheets/admin and move the files active_admin.js and active_admin.css.scss into these folders, respectively.
Create the folders app/assets/javascripts/admin and app/assets/stylesheets/admin and move the files active_admin.js and active_admin.css.scss into these folders, respectively.
In your app/assets/stylesheets/application.css.scss you will find the following near the top:
*= require_self
*= require_true .
Change this to:
*= require_self
*= require_directory .
Do the same for application.js.
Re-including the files in active admin The culprit is active_admin’s asset_registration.rb and application.rb:
def register_default_assets
register_stylesheet 'active_admin.css'
register_javascript 'active_admin.js'
end
To clear these and replace them with the new files, add the following to the bottom of config/initializers/active_admin.rb:
config.clear_stylesheets!
config.register_stylesheet 'admin/active_admin.css'
config.clear_javascripts!
config.register_javascript 'admin/active_admin.js'
Heroku deployment problems When deploying to heroku, you may see something like this in the logs:
Started GET "/admin/login" for 146.115.108.146 at 2011-12-22 16:03:32 +0000
ActionView::Template::Error (admin/active_admin.css isn't precompiled):
6: <title><%= [
7:
8: <% ActiveAdmin.application.stylesheets.each do |path| %>
9: <%= stylesheet_link_tag path %>
10: <% end %>
12: <%= javascript_include_tag path %>
11: <% ActiveAdmin.application.javascripts.each do |path| %>
The files need to be precompiled for production, as noted in this issue. Add the following to application.rb (or config file of choice):
config.assets.precompile += %w[admin/active_admin.css admin/active_admin.js]
I did exactly what in that tutorial but I got a very strange error with this Chinese characters when I access http://localhost:3000/admin it redirect to http://localhost:3000/admin/login and show this error
757 unexpected token at:...(I could not paste the error as text because of stack overflow spam filter does not allow Chinese characters.)

in base.js.coffee:
#= require jquery
#= require ./jquery_ui
#= require jquery_ujs
#= require_self
#= require_tree ./lib
#= require_tree ./ext
#= require ./application
window.ActiveAdmin = {}
any ideas please?