Home > rails syntax > rails syntax error unexpected tassoc

Rails Syntax Error Unexpected Tassoc

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Syntax error, unexpected tASSOC, expecting keyword_end up vote 1 down vote favorite Added the convert_options code to existing Paperclip code in my user method. Now getting: /Users/-----/----/-------/app/models/user.rb:148: syntax error, unexpected tASSOC, expecting keyword_end :convert_options => { :small => '-quality 40' } What am I missing? User Model: ... # Paperclip has_attached_file :photo, :styles => { :small => ["50x50#", :jpeg], :big => ["450x450#", :jpeg] } :convert_options => { :small => '-quality 40' } validates_attachment_size :photo, :less_than => 5.megabytes validates_attachment_content_type :photo, :content_type => ['image/jpeg', 'image/png'] ... ruby-on-rails syntax paperclip share|improve this question edited Jun 1 '13 at 18:39 Simone Carletti 122k24253297 asked Jun 1 '13 at 18:18 Zander Perry 49110 add a comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted You're missing a comma after your :styles => {...}. share|improve this answer answered Jun 1 '13 at 18:28 RobHeaton 1,0351713 Awesome. Thanks Rob. –Zander Perry Jun 1 '13 at 18:37 Yes. It could help if you line up your symbols in a column. I'll just show an example down in an answer here. –Douglas G. Allen Aug 24 '14 at 19:58 add a comment| up vote 0 down vote has_attached_file :photo, :styles => { :

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Syntax error, unexpected tASSOC, expecting keyword_end up vote 1 down vote favorite Added the convert_options code to existing Paperclip code in my user method. Now getting: /Users/-----/----/-------/app/models/user.rb:148: syntax error, unexpected tASSOC, http://stackoverflow.com/questions/16875816/syntax-error-unexpected-tassoc-expecting-keyword-end expecting keyword_end :convert_options => { :small => '-quality 40' } What am I missing? User Model: ... # Paperclip has_attached_file :photo, :styles => { :small => ["50x50#", :jpeg], :big => ["450x450#", :jpeg] } :convert_options => { :small => '-quality 40' } validates_attachment_size :photo, :less_than => 5.megabytes validates_attachment_content_type :photo, :content_type => ['image/jpeg', 'image/png'] ... ruby-on-rails syntax paperclip share|improve this question edited Jun 1 '13 at 18:39 Simone Carletti 122k24253297 asked Jun 1 '13 at 18:18 Zander Perry 49110 add a http://stackoverflow.com/questions/16875816/syntax-error-unexpected-tassoc-expecting-keyword-end/25475748 comment| 2 Answers 2 active oldest votes up vote 3 down vote accepted You're missing a comma after your :styles => {...}. share|improve this answer answered Jun 1 '13 at 18:28 RobHeaton 1,0351713 Awesome. Thanks Rob. –Zander Perry Jun 1 '13 at 18:37 Yes. It could help if you line up your symbols in a column. I'll just show an example down in an answer here. –Douglas G. Allen Aug 24 '14 at 19:58 add a comment| up vote 0 down vote has_attached_file :photo, :styles => { :small => ["50x50#", :jpeg], :big => ["450x450#", :jpeg] }, :convert_options => { :small => '-quality 40' } I know that it's a lot of indenting but it helps me when I try to debug some thing. Some editors highlight opening brackets with closing ones. It can also help. share|improve this answer answered Aug 24 '14 at 19:56 Douglas G. Allen 823715 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged ruby-on-rails syntax paperclip or ask your own question. asked 3 years ago viewed 5868 times

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://stackoverflow.com/questions/4540829/mysterious-ruby-syntax-error workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join rails syntax them; it only takes a minute: Sign up mysterious ruby syntax error up vote 12 down vote favorite 1 i'm beyond confused: this is almost a copy/paste out of a RoR action mailer guide, and yet it throws a syntax error: class Contact < ActionMailer::Base def contact a_name, a_company, a_phone, a_email, a_comments subject "Contact request from #{name}" recipients "some@address.com" rails syntax error from "some_other@address.com" sent_on Time.now body { :name => a_name, :company => a_company, :phone => a_phone, :email => a_email, :comments => a_comments } end end the error is: app/models/contact.rb:9: syntax error, unexpected tASSOC, expecting '}' body { :name => a_name, :company => a_company... ^ app/models/contact.rb:9: syntax error, unexpected tASSOC, expecting tCOLON2 or '[' or '.' ...{ :name => a_name, :company => a_company, :phone => a_phone,... ^ app/models/contact.rb:9: syntax error, unexpected tASSOC, expecting tCOLON2 or '[' or '.' ...ompany => a_company, :phone => a_phone, :email => a_email, :... ^ app/models/contact.rb:9: syntax error, unexpected tASSOC, expecting tCOLON2 or '[' or '.' ..., :phone => a_phone, :email => a_email, :comments => a_comme... ^ app/models/contact.rb:9: syntax error, unexpected tASSOC, expecting tCOLON2 or '[' or '.' ...email => a_email, :comments => a_comments, } ^ any ideas? i can't figure out what i'm doing wrong here. ruby-on-rails ruby share|improve this question edited Aug 11 '11 at 7:54 Devin M 7,98521937 asked Dec 27 '10 at 18:22 kolosy 1,44011438 add a comment| 2 Answers 2 active oldest votes up vote 26 down vote accept

 

Related content

rails syntax error unexpected $end expecting kend

Rails Syntax Error Unexpected end Expecting Kend p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies relatedl of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Unexpected end expecting kEND

rails syntax error unexpected kend expecting $end

Rails Syntax Error Unexpected Kend Expecting end p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow relatedl the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Ruby unexpected kEND expecting

rails syntax error unexpected kend

Rails Syntax Error Unexpected Kend p here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss relatedl the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up About Ruby error 'kEnd' up vote

rails syntax error unexpected tassoc expecting kend

Rails Syntax Error Unexpected Tassoc Expecting Kend p here for a quick overview of the site Help Center Detailed answers to any questions relatedl you might have Meta Discuss the workings and policies ruby tassoc of this site About Us Learn more about Stack Overflow the company ruby hash Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up

rails syntax error reserved word function

Rails Syntax Error Reserved Word Function table id toc tbody tr td div id toctitle Contents div ul li a href Coffee Script a li li a href Coffeescript Vs Javascript a li ul td tr tbody table p here for a quick overview of the site Help Center Detailed answers to any questions you relatedl might have Meta Discuss the workings and policies of this convert js to coffee site About Us Learn more about Stack Overflow the company Business Learn javascript in rails more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags