簡體   English   中英

添加設計gem后登錄頁面出錯

[英]Error on sign in page after adding devise gem

我正在使用一個曾經完美工作的應用程序在我的本地工作。 但是現在,當連接到我的localhost時,我收到此消息錯誤。 我使用了devise-2.2.3 gem

Started GET "/users/sign_in" for 127.0.0.1 at 2013-08-12 16:54:42 +0200
Creating scope :closed. Overwriting existing method MergeRequest.closed.
Processing by Devise::SessionsController#new as HTML
  Rendered devise/sessions/new.html.haml within layouts/devise (1.8ms)
  Rendered layouts/_head.html.haml (26.1ms)
Completed 500 Internal Server Error in 59ms

我注意到沒有layouts/_head.html.haml 那么有人知道這種錯誤的起源嗎?

正如所建議的那樣,我發布完整的堆棧,雖然我認為它沒有我之前發布的信息量多;)

Started GET "/users/sign_in" for 127.0.0.1 at 2013-08-12 17:16:27 +0200
Processing by Devise::SessionsController#new as HTML
  Rendered devise/sessions/new.html.haml within layouts/devise (1.8ms)
  Rendered layouts/_head.html.haml (88.1ms)
Completed 500 Internal Server Error in 94ms

ActionView::Template::Error (SyntaxError: unexpected IDENTIFIER
  (in /Users/git/gitlab/app/assets/javascripts/application.js.coffee)):
    5:     GitLab
    6:   = favicon_link_tag 'favicon.ico'
    7:   = stylesheet_link_tag    "application"
    8:   = javascript_include_tag "application", "internationalization.js", "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"
    9:   = csrf_meta_tags
    10:   = include_gon
    11: 
  app/views/layouts/_head.html.haml:8:in `_app_views_layouts__head_html_haml__3074448813358061809_70101269487200'
  app/views/layouts/devise.html.haml:3:in `_app_views_layouts_devise_html_haml__1317746148502442303_70101202019240'


Started GET "/static.css" for 127.0.0.1 at 2013-08-12 17:16:28 +0200
Processing by ProjectsController#show as HTML
  Parameters: {"id"=>"static.css"}
Completed 401 Unauthorized in 0ms
Started GET "/users/sign_in" for 127.0.0.1 at 2013-08-12 17:16:28 +0200
Processing by Devise::SessionsController#new as HTML
  Rendered devise/sessions/new.html.haml within layouts/devise (1.9ms)
  Rendered layouts/_head.html.haml (25.9ms)
Completed 500 Internal Server Error in 32ms

ActionView::Template::Error (SyntaxError: unexpected IDENTIFIER
  (in /Users/git/gitlab/app/assets/javascripts/application.js.coffee)):
    5:     GitLab
    6:   = favicon_link_tag 'favicon.ico'
    7:   = stylesheet_link_tag    "application"
    8:   = javascript_include_tag "application", "internationalization.js", "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"
    9:   = csrf_meta_tags
    10:   = include_gon
    11: 
  app/views/layouts/_head.html.haml:8:in `_app_views_layouts__head_html_haml__3074448813358061809_70101269487200'
  app/views/layouts/devise.html.haml:3:in `_app_views_layouts_devise_html_haml__1317746148502442303_70101202019240'


Started GET "/favicon.ico" for 127.0.0.1 at 2013-08-12 17:16:28 +0200
Processing by ProjectsController#show as */*
  Parameters: {"id"=>"favicon.ico"}
Completed 401 Unauthorized in 0ms
Started GET "/users/sign_in" for 127.0.0.1 at 2013-08-12 17:16:28 +0200
Processing by Devise::SessionsController#new as */*
  Rendered devise/sessions/new.html.haml within layouts/devise (1.8ms)
  Rendered layouts/_head.html.haml (27.2ms)
Completed 500 Internal Server Error in 33ms

ActionView::Template::Error (SyntaxError: unexpected IDENTIFIER
  (in /Users/git/gitlab/app/assets/javascripts/application.js.coffee)):
    5:     GitLab
    6:   = favicon_link_tag 'favicon.ico'
    7:   = stylesheet_link_tag    "application"
    8:   = javascript_include_tag "application", "internationalization.js", "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"
    9:   = csrf_meta_tags
    10:   = include_gon
    11: 
  app/views/layouts/_head.html.haml:8:in `_app_views_layouts__head_html_haml__3074448813358061809_70101269487200'
  app/views/layouts/devise.html.haml:3:in `_app_views_layouts_devise_html_haml__1317746148502442303_70101202019240'


Started GET "/favicon.ico" for 127.0.0.1 at 2013-08-12 17:16:28 +0200
Processing by ProjectsController#show as */*
  Parameters: {"id"=>"favicon.ico"}
Completed 401 Unauthorized in 0ms
Started GET "/users/sign_in" for 127.0.0.1 at 2013-08-12 17:16:28 +0200
Processing by Devise::SessionsController#new as */*
  Rendered devise/sessions/new.html.haml within layouts/devise (1.8ms)
  Rendered layouts/_head.html.haml (25.0ms)
Completed 500 Internal Server Error in 31ms

ActionView::Template::Error (SyntaxError: unexpected IDENTIFIER
  (in /Users/git/gitlab/app/assets/javascripts/application.js.coffee)):
    5:     GitLab
    6:   = favicon_link_tag 'favicon.ico'
    7:   = stylesheet_link_tag    "application"
    8:   = javascript_include_tag "application", "internationalization.js", "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"
    9:   = csrf_meta_tags
    10:   = include_gon
    11: 
  app/views/layouts/_head.html.haml:8:in `_app_views_layouts__head_html_haml__3074448813358061809_70101269487200'
  app/views/layouts/devise.html.haml:3:in `_app_views_layouts_devise_html_haml__1317746148502442303_70101202019240'

好吧,布局不是你的問題(我不認為),當在堆棧溢出上發布錯誤時,發布堆棧跟蹤非常重要

堆棧跟蹤是擁有關於錯誤的所有知識的聖杯,沒有它,我們就完全迷失了。 發布堆棧跟蹤,並嘗試重新啟動rails服務器。 確保遷移數據庫,然后我們可以修復錯誤。

這一行:

= javascript_include_tag "application", "internationalization.js", "http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"

被打破。

我不知道為什么,可能是因為你在同一行列出了JS文件。 javascript文件本身可能存在問題,但不確定,但這就是錯誤所在。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM