Ruby on rails Rails新手-需要帮助吗

Ruby on rails Rails新手-需要帮助吗,ruby-on-rails,Ruby On Rails,RubyonRails初学者(上周五开始使用Rails:-) 回到话题上来!我在Rails中创建了一个HTML5音乐流应用程序 但是,我似乎无法让应用程序正常运行,因为我不断遇到以下错误: NameError in SongsController#index -- uninitialized constant SongsController::BUCKET 经过一些实验后,我通过在我的songs\u controller.rb中定义BUCKET='ctmusic'来“修复”——我不确定是否真的

RubyonRails初学者(上周五开始使用Rails:-)

回到话题上来!我在Rails中创建了一个HTML5音乐流应用程序

但是,我似乎无法让应用程序正常运行,因为我不断遇到以下错误:

NameError in SongsController#index -- uninitialized constant SongsController::BUCKET
经过一些实验后,我通过在我的
songs\u 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)
以下是您可以轻松解决可能出现的问题的方法:


如果我能得到一些帮助,我会非常感激,因为我正在尝试制作这个简单的应用程序,这样我就可以通过编辑这个应用程序并从中创建一些东西来了解更多:(

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


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

嗨,Nerian,它们是不正确的,因为我将它们更改为无效的,以防止有人使用我的访问密钥和密钥:P@imjp:我明白了。常用的方法是使用环境变量。任何环境变量您的系统中定义的ble可以从ruby通过ENV['variable name']访问。今天我将通读这本书,感谢您的建议:)