Reputation: 33775
I am using Rails 4.1.6 and Ruby 2.1.5.
I have the following code, but I am getting an error:
params = {
input: @model.video.url,
test: true,
notifications: [zencoder_url],
pass_through: @model.id
outputs: [
{
public: true,
base_url: base_url,
filename: "mp4_" + filename_without_ext + '.mp4',
label: 'webmp4',
format: 'mp4',
audio_codec: 'aac',
video_codec: 'h264'
},
{
public: true,
base_url: base_url,
filename: "web_" + filename_without_ext + '.webm',
label: 'webwebm',
format: 'webm',
audio_codec: 'vorbis',
video_codec: 'vp8'
},
{
public: true,
base_url: base_url,
filename: "ogv_" + filename_without_ext + '.ogv',
label: 'webogv',
format: 'ogv',
audio_codec: 'vorbis',
video_codec: 'theora'
},
{
thumbnails: {
public: true,
base_url: base_url,
filename: "thumbnail_" + filename_without_ext,
times: [3],
aspect_mode: 'preserve',
width: '100',
height: '100'
}
}
]
}
This is the error I get when trying to visit any page in my app:
Started GET "/" for 127.0.0.1 at 2015-05-14 00:26:08 -0500
ActiveRecord::SchemaMigration Load (3.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
User Load (6.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 57 ORDER BY "users"."id" ASC LIMIT 1
Processing by DashboardController#index as HTML
Completed 500 Internal Server Error in 12ms
SyntaxError - syntax error, unexpected tIDENTIFIER, expecting '}'
outputs: [
^
/app/uploaders/video_uploader.rb:102: syntax error, unexpected '}', expecting keyword_end:
What could be causing this error? The syntax seems legit for me. I don't seem to be missing any curly braces or square brackets.
Upvotes: 1
Views: 359