2014-12-11 17 views
0

我試圖獲得this starter app的工作。我的第一個問題是在點擊任何註冊或登錄鏈接以及任何應發送電子郵件的鏈接後收到錯誤ActionController::InvalidAuthenticityToken。我通過將我的應用程序控制器中的protect_from_forgery :with => :exception行改爲protect_from_forgery :with => :null_session來解決此問題。現在,點擊以上任何按鈕只會將我重定向到註冊頁面,而不是將用戶簽入其配置文件。在開發中獲得Rails4-StarterKit安裝程序

我認爲這應該很容易通過克隆Github回購重現。我所做的只是運行一個bundle installrake db:create,這兩個工作正常。

PS

我也收到此錯誤。不確定它是否相關。實際上,StarterKit應用程序內部沒有contacts\new視圖,我相信它來自我的另一個應用程序;這是一個允許用戶發送電子郵件的視圖。但消息來自運行StarterKit應用程序的服務器......奇怪。我想我必須弄清楚Dalli :: Server是什麼。

Started GET "/contacts/new" for 127.0.0.1 at 2014-12-11 00:23:44 -0500 
Started GET "/contacts/new" for 127.0.0.1 at 2014-12-11 00:23:44 -0500 
Cache read: _session_id:d0fd8ec75b1e5f9c0a0088a62a8df251 
Cache read: _session_id:d0fd8ec75b1e5f9c0a0088a62a8df251 
Dalli::Server#connect 127.0.0.1:11211 
Dalli::Server#connect 127.0.0.1:11211 
127.0.0.1:11211 failed (count: 8) Errno::EPIPE: Broken pipe - write 
127.0.0.1:11211 failed (count: 8) Errno::EPIPE: Broken pipe - write 
127.0.0.1:11211 is still down (for 260.077 seconds now) 
127.0.0.1:11211 is still down (for 260.077 seconds now) 
DalliError: No server available 
DalliError: No server available 

不管怎麼說,我沒有足夠的經驗來推測出這一切對我自己,所以我真的很感激,如果有人可以幫助我。在此先感謝大家。

回答

0

該錯誤表示您尚未開始memcached。看看Installation部分,你會看到下面的命令對OSX

/usr/local/opt/memcached/bin/memcached 
+0

謝謝開始memcached。我安裝了memcached,儘管我的終端在運行該命令後不輸出任何內容,但它只是掛起。這是正常的嗎? – domi91c 2014-12-14 02:27:48

+0

@portOdin爲了確保memcached已正確啓動,請運行Rails應用程序,並且不應該看到您發佈的錯誤。或者您也可以檢查memcached是否在端口11211上運行。 – Hoa 2014-12-14 02:31:43

相關問題