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:
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
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
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.
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.