Rails新手在这里 - 需要一些帮助

时间:2011-06-18 02:05:49

标签: ruby-on-rails

Ruby on Rails初学者(上周五从rails开始: - )

回到主题!我通过this tutorial在Rails中创建了一个HTML5音乐流媒体应用程序。

然而,我似乎无法让应用程序正常工作,因为我不断收到此错误:

NameError in SongsController#index -- uninitialized constant SongsController::BUCKET

经过一些实验,我“修复” - 我不确定我是否真的修复了它,但我在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 个答案:

答案 0 :(得分:0)

代码正在尝试与amazon建立连接,但如果您查看配置/应用程序中提供的ID和密码,您会注意到这些不太可能是正确的。

我建议你选一本好书。实用程序员使用ruby on rails进行Web开发是一个不错的选择。

相关问题