1
Ruby on Rails初學者在這裏(上週五開始使用rails :-)Rails新手在這裏 - 需要一些幫助
返回主題!我通過this tutorial在Rails中創建了一個HTML5音樂流應用程序。
不過,我似乎無法得到應用任何工作,因爲我不斷收到此錯誤:
NameError in SongsController#index -- uninitialized constant SongsController::BUCKET
一些試驗,我的「固定」後 - 我不知道如果我真的解決了它,但我停止了這個錯誤 - 通過在我的songs_controller.rb
中定義BUCKET = 'ctmusic'
。
之後,我開始收到以下錯誤:
AWS::S3::RequestTimeTooSkewed in SongsController#index -- The difference between the request time and the current time is too large.
以下是錯誤輸出:
Started GET "/songs/" for 127.0.0.1 at 2011-06-16 16:20:41 -0500
Processing by SongsController#index as HTML
Completed 500 Internal Server Error in 286ms
AWS::S3::RequestTimeTooSkewed (The difference between the request time and the current time is too large.):
app/controllers/songs_controller.rb:5:in `index'
Rendered C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0.rc4/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.0ms)
Rendered C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0.rc4/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.0ms)
Rendered C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.1.0.rc4/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (14.0ms)
這裏的my github files因此您可以輕鬆簡單的東西可能是錯誤的:
我如果我得到一些幫助,我真的很感激它,因爲我試圖製作這個簡單的應用程序,所以我可以通過編輯這個應用程序並創建一些應用程序來學習更多:
嗨Nerian, 他們是不正確的,因爲我將它們改爲無效,以防止有人使用我的訪問密鑰和密鑰:P – imjp
@imjp:我明白了。常用的方法是使用環境變量。系統中定義的任何環境變量都可以通過使用ENV ['variable name']的ruby進行訪問 – Nerian
今天我要讀完這本書,感謝您的建議:) – imjp