Ruby on Rails beginner here(先週の金曜日:-)Rails newbie here - 何か助けが必要
トピックに戻る! this tutorialに行って、RailsでHTML5音楽ストリーミングアプリを作成しました。私はアプリが全く仕事を得るように見えることはできません、私はこのエラーを取得保管として
しかし、:
NameError in SongsController#index -- uninitialized constant SongsController::BUCKET
をいくつか試した後、私は「固定」 - I場合、私はわからないんだけど本当にそれを修正しましたが、私はBUCKET = 'ctmusic'
を私のsongs_controller.rb
に定義することによって、そのエラーを止めました。その後
は、私は次のエラーを取得開始しました:ここ
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そうすることができます簡単に簡単です:
私は私はこの単純なアプリを作ろうとしているので、私はいくつかの助けがあれば本当に感謝しています。私はこの1つのアプリを編集して何かを作り出すことでもっと学ぶことができます:(
こんにちはNerian、 誰かが自分のアクセスキーと秘密鍵を使用できないように無効に変更したため、間違っています:P – imjp
@imjp:そうです。一般的なアプローチは、環境変数を使用することです。あなたのシステムで定義されている環境変数は、ENV ['変数名']を使ってRubyからアクセスできます – Nerian
私は本を今日通していきます。 – imjp