Rails beginner here - uninitialized constant

Hi guys, rails newbie here(started with rails last Friday :slight_smile:

Back on topic! I went through this tutorial: http://bit.ly/frV1hv to
create an HTML5 music streaming app in rails.

However, I can’t seem to get the app to work whatsoever, as I kept
getting this error:

After some experimenting, I “fixed” – I’m not sure if I really fixed
it, but i stopped getting that error – by defining the BUCKET =
‘ctmusic’ in my songs_controller.rb

Afterwards, I started getting the following error:
http://i.imgur.com/adDZB.jpg

Here are the error output: Started GET "/songs/" for 127.0.0.1 at 2011-06-16 16:20:41 -0500 Processing b - Pastebin.com
Here’s my github files so you can easily easy what might be wrong:
GitHub - imjp/mp3app

I’d really appreciate it if I got some help because I’m trying to make
this simple app so I can learn more by editing this one app and
creating something out of it :frowning:

Thanks in advance guys.

On Jun 17, 2:00am, imjp [email protected] wrote:

it, but i stopped getting that error – by defining the BUCKET =
‘ctmusic’ in my songs_controller.rb

Afterwards, I started getting the following error:http://i.imgur.com/adDZB.jpg

Is the clock on your computer right (and with the timezone set
correctly) ? Requests to S3 are signed, and that signature includes
the current time, Amazon will reject any requests where the time
embedded in the signature is too different from the time at which it
processes the request.

Fred

Here’s a sloppy fix that got your code working for me

first off, I think you can safely delete the s3.yml file. I didn’t seem
to
need it

in application.rb replace

BUCKET = 'ctmusic'

with

config.bucket = 'ctmusic'

Instead of calling BUCKET in your controller, call

Mp3app::Application.config.bucket

finally, I think the access_key_id and secret_access_key are hilarious
but
likely not real…

As someone who’s also very new to rails and programming in general I’d
offer
you this advice:

If you choose to follow tutorials, stick with their exact rails, ruby
and
associated gem versions while doing it.
If you can’t find those things out, don’t follow that tutorial
Rails and other gems along with it move so damn quickly that you can’t
count
of your version being even close to the one someone 2 months ago was
using.
I’ve wasted a lot of my time trying to fix problems so far beyond my
comprehension rather than just echo the tutorial’s setup and actually
learning. If you don’t hammer some things down you end up loosing the
forest
among the trees.