namespace :less do
  namespace :js do
    desc "Make a js file that will have functions that will return restful routes/urls."
    task :routes => :environment do
      require "js-routes"

      # Hack for actually load the routes (taken from railties console/app.rb)
      ActionDispatch::Callbacks.new(lambda {}, false)

      JsRoutes.generate!
    end
  end
end

namespace :js do
  desc "Make a js file that will have functions that will return restful routes/urls."
  task :routes => :environment do
    require "js-routes"

    # Hack for actually load the routes (taken from railties console/app.rb)
    ActionDispatch::Callbacks.new(lambda {}, false)

    JsRoutes.generate!
  end
end

Remove less namespace from rake task
Remove less namespace from rake task
