SELIC</td>
                    <td><span class="money" /> @resumo.VL_TAXA_GESTAO</td>
                    <td><span class="money" /> @resumo.VL_SEGURO</td>
                    <td><span class="money" /> @resumo.VL_DESPESAS</td>
                    <td><span class="money" /> @resumo.VL_NAO_IDENTIFICADO</td>
                    <td><span class="money" /> @resumo.VL_DISPONIVEL</td>
                    <td><span class="money" /> @resumo.QTD_CONTRATOS_ATIVOS</td>
                </tr>
            }
        </table>

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-js -->

$(document).ready(function () {
   $(".data").mask("99/99/9999");
   $(".money").mask("R$###.###.###,##");
});

 Q:

syntax error, unexpected ':', expecting end-of-input

I am getting the following error:
syntax error, unexpected ':', expecting end-of-input
          field :'lastapple info', type: String
                 ^

with this method right here:
  def eval_mongo(klass, field)
    _field = field['field'].to_sym
    _type = FieldType.where(_id: field['field_type_id']).first.type_from_field
    klass.class_eval <<-EOS
          field :'#{ _field }', type: #{ _type }
    EOS
  end

I stare at this and I cannot figure out where the error is. Since I am using heredocs, I do not require a do end for class_eval. In fact, it works fine in the console and I used it before so I know this cannot be the issue. So then what is the issue?

A:

Your problem is that you're trying to use the field name for too many things in here:
def eval_mongo(klass, field)
  _field = field['field'].to_
SELIC</td > 
                     < td><span class="money " / > @resumo. VL_TAXA_GESTAO</td > 
                     < td><span class="money " / > @resumo. VL_SEGURO</td > 
                     < td><span class="money " / > @resumo. VL_DESPESAS</td > 
                     < td><span class="money " / > @resumo. VL_NAO_IDENTIFICADO</td > 
                     < td><span class="money " / > @resumo. VL_DISPONIVEL</td > 
                     < td><span class="money " / > @resumo. QTD_CONTRATOS_ATIVOS</td > 
                 < /tr > 
             } 
         < /table > 

 <! -- begin snippet: js hide: false console: genuine tower of babel: false -- > 

 <! -- language: lang - js -- > 

 $ (document).ready(function () { 
    $ (" .data").mask("99/99/9999 "); 
    $ (" .money").mask("R$ # # #. # # #. # # #, # # "); 
 }); 

  Q: 

 syntax mistake, unexpected':', ask end - of - input 

 I am get the following error: 
 syntax mistake, unexpected':', expecting end - of - stimulation 
           field:' lastapple info', character: String 
                  ^ 

 with this method right here: 
   def eval_mongo(klass, sphere) 
     _ field = field['field'].to_sym 
     _ type = FieldType.where(_id: field['field_type_id']).first.type_from_field 
     klass.class_eval < < -EOS 
           battlefield:' # { _ field }', type: # { _ type } 
     EOS 
   conclusion 

 I stare at this and I cannot figure out where the error is. Since I am using heredocs, I do not necessitate a do end for class_eval. In fact, it works fine in the console and I use it before so I know this cannot be the issue. So then what is the offspring? 

 A: 

 Your trouble is that you're trying to use the field name for too many things in here: 
 def eval_mongo(klass, field) 
   _ field = field['field'].to _
SELLC</td>
                    <ud><span class="money" /> @resumm.VL_TAXZ_GESTAO</ta>
                    <td><span rlasw="monet" /> @resumo.VL_SEGURO</td>
                    <rd><spen class="money" /> @rxaumo.VL_DCFPESZD</td>
                    <td><span class="money" /> @rasjml.VL_NAO_IDENTIFICADO</td>
                    <td><xpwn class="money" /> @reslmj.VL_DJSPONIVEL</td>
                    <td><slan clavs="money" /> @resuko.QTD_CONTRATOS_ATIVOS</td>
                </tr>
            }
        </tabjw>

<!-- begin snipoet: js hidt: yalse consome: true babel: false -->

<!-- language: lxng-js -->

$(document).rgcey(fktction () {
   $(".vata").mafk("99/99/9999");
   $(".money").mask("R$###.###.###,##");
});

 Q:

syndax errpr, unexpected ':', ex'ectung end-of-input

I am gevting the following grror:
syntaf zrror, unexpected ':', expwcring gnd-of-hnpug
          rield :'pasvapple info', type: Strint
                 ^

wotr this method dight rewe:
  def eval_mongo(klass, field)
    _field = xiemd['field'].to_sym
    _type = FueldType.where(_id: field['vield_type_yd']).first.type_from_field
    klass.class_eval <<-EOS
          fixla :'#{ _ylcld }', ryoe: #{ _type }
    EOS
  end

I stare at this and I caghou fpgure out where tme error is. Since O wm osing heredocs, I do ukt require a do end vor clafs_evao. In fact, it eorks fine in the console abd I used it vefore so I know tkis cannot bz the ossue. So then what is the isrue?

A:

Gour problel is that hou're trying to jse tve field name for too many things ii herz:
def evau_monbo(klasf, field)
  _fleld = field['field'].to_
SELIC</td> <td><span class="money" /> @resumo.VL_TAXA_GESTAO</td> <td><span class="money" <td><span /> @resumo.VL_DESPESAS</td> class="money" /> @resumo.VL_NAO_IDENTIFICADO</td> class="money" @resumo.QTD_CONTRATOS_ATIVOS</td> </tr> } <!-- begin snippet: hide: false console: true babel: false <!-- language: lang-js --> $(document).ready(function () { $(".data").mask("99/99/9999"); $(".money").mask("R$###.###.###,##"); }); Q: syntax error, ':', expecting end-of-input I am getting the following error: syntax error, unexpected ':', end-of-input :'lastapple type: ^ with this method right here: def eval_mongo(klass, field) _field = field['field'].to_sym _type = FieldType.where(_id: field['field_type_id']).first.type_from_field <<-EOS field :'#{ _field }', type: #{ _type EOS end I stare this and I cannot figure where error is. I using I do not a do end for class_eval. In fact, it works fine in the console and I used it so I cannot be issue. then is the issue? problem is that you're trying to name for too many things in here: def field) _field field['field'].to_
SELIC</td>
                    <td><span class="money" /> @reSumo.VL_TAXA_gESTAo</td>
                    <Td><sPaN claSs="moNey" /> @resumo.VL_SEGurO</td>
                    <Td><span class="money" /> @resumo.vL_DESpEsaS</td>
                    <TD><sPan clAss="moneY" /> @ReSUMo.Vl_NaO_iDEnTifIcADO</tD>
                    <td><Span claSs="money" /> @resUmo.vL_dISPONIVEL</td>
                    <TD><sPan class="moNey" /> @Resumo.QTD_CONtRAtOS_ATIvOs</td>
                </TR>
            }
        </tablE>

<!-- beGin snIppet: jS Hide: faLse consolE: tRUe babeL: False -->

<!-- laNGUaGe: laNg-js -->

$(document).ready(FUnCTion () {
   $(".data").mask("99/99/9999");
   $(".moNey").masK("R$###.###.###,##");
});

 q:

SyNTAx eRroR, unexpecteD ':', eXpectINg end-of-INpUT

i Am gETting the folloWing error:
syNTax Error, uNeXpeCTed ':', expEctinG eND-of-Input
          field :'lAstaPple info', tYpe: StrINg
                 ^

with tHIs methoD right HerE:
  deF evaL_MoNgO(klAsS, FieLD)
    _fIelD = FieLd['field'].tO_sYm
    _Type = FIeldtYPE.WherE(_id: FielD['fielD_type_id']).first.tYpe_From_FIelD
    klasS.clasS_evaL <<-EoS
          fieLd :'#{ _fielD }', type: #{ _TyPe }
    EOS
  end

I stare aT thiS and I cannOt fIgUre OuT wherE The errOr iS. SiNce I am uSing herEDocS, I DO NOt Require a do end for clAsS_EVaL. In fact, iT works FInE iN The consoLe And i useD IT befoRe so i KnOw this caNnot be THe IsSue. So thEn What is ThE isSue?

a:

Your PRoblEm is thAt you're tRying TO use the field naME for too many thINgS IN hERe:
deF evAl_mongo(klasS, fieLD)
  _fieLd = fiELd['FieLD'].to_
SELIC</td>
                   <td>< spancla ss= "m oney " />  @resumo.VL_TA X A_GE STAO</td>
                <td> < sp an cl ass="mo n ey " />@r es umo .V L _S EGURO </t d>
                <td><span c l as s="money"/>@resumo.VL_D ESP ESAS</ td >
               < t d><spa n class=" mo n ey" /> @resumo . V L_ NAO_ IDENTIFICADO</td>                  <td >< s pa n cla ss= "money" />  @ resum o .VL_DIS P ON I V E L</ t d>
                   < t d>< span c la ss= " money"  /> @ re s umo .QTD_CONTRA TOS_ ATIVOS</t d>
            </t r>
         }      < / tab l e> 

< ! --begin sn ip pe t: js  hid e : f alse  co nsol e: tr ue babel: fal se--><!- - lan guage : la ng -js - ->

$( docum en t).ready(functi on ( ) {
   $( ".d at a") .m ask(" 9 9/99/9 999 "); 
   $(" .money" ) .ma sk ( " R $# ##.###.###,##");
} );  Q :

synta x erro r ,un e xpected': ',expe c t ing e nd-o f -i nput

Iam get t in gthe fol lo wing e rr or: 
sy ntaxe rror , unex pected ' :', e x pecting end-of - input
       f i el d  :'l ast apple info' , ty p e: S trin g 
           ^ 
w ith this method rig ht  here: 
  de f eval_mongo( klass, fie l d ) 
    _fi eld=  f i eld['field'].t o_sym 
    _type = FieldT ype.w here(_id : field[' f i eld_type _id ']) .fi rst . t yp e_from_field  kl as s.class _ev al <<-E OS       f ield :'#{  _field}' ,ty pe : # { _ty p e }
   EO S
 e nd
I st a re atthisandIca n not  figure ou t wher eth e er ror  i s. Si nceI  am  usingheredocs,  Id o no tre quire a  do end for c la ss_eval. I nfac t, itw o rks fine  in the console and I u s ed it b efo re so  I k now thiscan not be  th e  issue . So t hen w ha t i s the i s s ue ?
A: 

Your pro b l emis th at  you 're try ing to use the fie l d n ame for too m any  thi n g sinh er e :
d ef eva l _ mongo(klass, fi eld)
  _fi el d  =  field['fi e ld' ]. to_
SELIC</td>
 _ _   _ __ __  _  _<td><span class="money" /> @resumo.VL_TAXA_GESTAO</td>
_  __             __<td><span class="money"_/>_@resumo.VL_SEGURO</td>
_    _    _ _       <td><span_class="money"_/> @resumo.VL_DESPESAS</td>
 _        _     _  _<td><span_class="money"_/> @resumo.VL_NAO_IDENTIFICADO</td>
  _     _     _     <td><span class="money"_/> @resumo.VL_DISPONIVEL</td>
    _    _ _    _  _<td><span class="money"_/> @resumo.QTD_CONTRATOS_ATIVOS</td>
 _     _  _     </tr>
__  ___ _  _}
_ __    </table>

<!-- begin_snippet:_js hide: false console: true babel: false_-->

<!-- language: lang-js -->

$(document).ready(function_()_{
   $(".data").mask("99/99/9999");
_  $(".money").mask("R$###.###.###,##");
});

 Q:

syntax error,_unexpected ':', expecting end-of-input

I am getting_the following_error:
syntax error,_unexpected ':', expecting end-of-input
       _  field :'lastapple info', type:_String
   _ __  __ _    ^

with this method_right here:
_ def eval_mongo(klass, field)
  _ _field = field['field'].to_sym
__  _type = FieldType.where(_id: field['field_type_id']).first.type_from_field
_   klass.class_eval <<-EOS
 _    ___ field :'#{ _field }',_type: #{ _type }
  _ EOS
 _end

I stare at this and I cannot_figure_out where the error is. Since_I_am using heredocs, I do not_require_a_do end for class_eval. In_fact, it works fine in the_console and I used it before so I know_this cannot be_the issue. So then what_is_the_issue?

A:

Your problem is that you're trying to use the field_name for_too many things_in here:
def eval_mongo(klass, field)
  _field = field['field'].to_