Closed mkeefe closed 6 years ago
Here is the video_controller.rb
upload()
method, if needed.
def upload
video = params[:video]
if video
file_data = File.open(video.tempfile.path)
logger.info file_data.path
logger.info file_data
# Send file to Amazon S3 bucket and grab URL
uploader = VideoUploader.new
uploader.store!(file_data) # <-- This line is where the app dies - NoMethodError
end
end
Fixed! The problem was pretty stupid. The initializer file was in the environments directory, not the initializers, don't code on an empty stomach. Would be great if the code could detect that, but solved.
Very weird bug, albeit with no context or trace. Google says its a region error on AWS, but i've tried a few different regions (S3 is global) as well as a different bucket.
Here is my GemFile excerpt
Here is my carrierwave.rb config file
Here is my uploader
Update: Here is what comes from the console, if it helps
Any ideas?