Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2019
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. Error in src/app_template.cr:1: while requiring "../config/application"
  2.  
  3. require "../config/application"
  4. ^
  5.  
  6. in config/application.cr:22: while requiring "./routes"
  7.  
  8. require "./routes"
  9. ^
  10.  
  11. in config/routes.cr:1: instantiating 'Amber::Server.class#configure()'
  12.  
  13. Amber::Server.configure do
  14. ^~~~~~~~~
  15.  
  16. in config/routes.cr:1: instantiating 'Amber::Server.class#configure()'
  17.  
  18. Amber::Server.configure do
  19. ^~~~~~~~~
  20.  
  21. in config/routes.cr:34: expanding macro
  22.  
  23. routes :api do
  24. ^
  25.  
  26. in macro 'routes' /home/necros/Documents/Dev/Crystal/app_template/lib/amber/src/amber/dsl/server.cr:2, line 1:
  27.  
  28. > 1. router.draw :api, "" do
  29. 2. begin get("/foos/:id", GenericController(Foo), :show)
  30. 3. get("/bars/:id", GenericController(Bar), :show)
  31. 4. end
  32. 5. end
  33. 6.
  34.  
  35. instantiating 'Amber::Router::Router#draw(Symbol, String)'
  36. in config/routes.cr:34: expanding macro
  37.  
  38. routes :api do
  39. ^
  40.  
  41. in macro 'routes' /home/necros/Documents/Dev/Crystal/app_template/lib/amber/src/amber/dsl/server.cr:2, line 1:
  42.  
  43. > 1. router.draw :api, "" do
  44. 2. begin get("/foos/:id", GenericController(Foo), :show)
  45. 3. get("/bars/:id", GenericController(Bar), :show)
  46. 4. end
  47. 5. end
  48. 6.
  49.  
  50. instantiating 'Amber::Router::Router#draw(Symbol, String)'
  51. in macro 'get' expanded macro: macro_140583407477856:2, line 1:
  52.  
  53. > 1. route :get, "/foos/:id", GenericController(Foo), :show
  54. 2.
  55. 3. route :head, "/foos/:id", GenericController(Foo), :show
  56. 4.
  57. 5. route :get, "/foos/:id", GenericController(Foo), :show
  58. 6.
  59. 7. route :options, "/foos/:id", GenericController(Foo), :show
  60. 8.
  61. 9.
  62.  
  63. expanding macro
  64. in macro 'route' /home/necros/Documents/Dev/Crystal/app_template/lib/amber/src/amber/dsl/router.cr:11, line 2:
  65.  
  66. 1. __temp_1470 = ->(context : HTTP::Server::Context){
  67. > 2. controller = GenericController(Foo).new(context)
  68. 3. controller.run_before_filter(:show) unless context.content
  69. 4. unless context.content
  70. 5. context.content = controller.show.to_s
  71. 6. controller.run_after_filter(:show)
  72. 7. end
  73. 8. }
  74. 9. __temp_1471 = "GET"
  75. 10. __temp_1472 = Amber::Route.new(
  76. 11. __temp_1471, "/foos/:id", __temp_1470, :show, valve, scope, "GenericController(Foo)", {} of String => Regex
  77. 12. )
  78. 13.
  79. 14. router.add(__temp_1472)
  80. 15.
  81.  
  82. expanding macro
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement