ruby on rails - Syntax error with hash and square brackets -
i using rails 4.1.6 , ruby 2.1.5.
i have following code, getting 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 error when trying visit page in app:
started "/" 127.0.0.1 @ 2015-05-14 00:26:08 -0500 activerecord::schemamigration load (3.0ms) select "schema_migrations".* "schema_migrations" user load (6.3ms) select "users".* "users" "users"."id" = 57 order "users"."id" asc limit 1 processing dashboardcontroller#index 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 causing error? syntax seems legit me. don't seem missing curly braces or square brackets.
pass_through: @model.id
the ,
missing.
Comments
Post a Comment