# Hash /expecting tASSOC/

**URL:** <https://rubytalk.org/t/hash-expecting-tassoc/57006>\
**Category:** ruby-talk\
**Created:** [14 January 2010 21:20 UTC](https://rubytalk.org/t/hash-expecting-tassoc/57006 "2010-01-14T21:20:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidy1](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@aidy1](https://rubytalk.org/u/aidy1)\
**Post date:** [14 January 2010 21:20 UTC](https://rubytalk.org/t/hash-expecting-tassoc/57006/1 "2010-01-14T21:20:13Z")

</div>

Hi,

Can any tell me why I am getting the error: "syntax error, unexpected  
'=', expecting tASSOC" for the below hash please?

tem\_urls = {  
:home\_page =\> website\_root , :rm\_footage =\>  
"#{website\_root}/gallery/home/rightsmanaged.do",  
:rushes =\> "#{website\_root}/gallery/home.do", :rt\_footage  
="#{website\_root}/gallery/home/royaltyfree.do"  
}

Thanks

Aidy

---

<div class="post-metadata">

**Author:** ![Phillip\_Gawlowski1](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@Phillip\_Gawlowski1](https://rubytalk.org/u/Phillip_Gawlowski1)\
**Post date:** [14 January 2010 21:28 UTC](https://rubytalk.org/t/hash-expecting-tassoc/57006/2 "2010-01-14T21:28:17Z")

</div>

:rt\_footage ="#{website\_root}/gallery/home/royaltyfree.do"  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^^^  
The last key-value pair is "just" an "=", and not the expected "=\>".

> **···**
>
> On 14.01.2010 22:20, aidy wrote:
> 
> > Hi,
> > 
> > Can any tell me why I am getting the error: "syntax error, unexpected  
> > '=', expecting tASSOC" for the below hash please?
> > 
> > tem\_urls = {  
> > &nbsp;&nbsp;:home\_page =\> website\_root , :rm\_footage =\>  
> > "#{website\_root}/gallery/home/rightsmanaged.do",  
> > &nbsp;&nbsp;:rushes =\> "#{website\_root}/gallery/home.do", :rt\_footage  
> > ="#{website\_root}/gallery/home/royaltyfree.do"  
> > &nbsp;&nbsp;}
> 
> --  
> Phillip Gawlowski

---

<div class="post-metadata">

**Author:** ![aidy1](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@aidy1](https://rubytalk.org/u/aidy1)\
**Post date:** [14 January 2010 21:36 UTC](https://rubytalk.org/t/hash-expecting-tassoc/57006/3 "2010-01-14T21:36:58Z")

</div>

Apologies for being an idiot

> **···**
>
> On 14 Jan, 21:28, Phillip Gawlowski \<p...@thimian.com\> wrote:
> 
> > On 14.01.2010 22:20, aidy wrote:
> > 
> > \> Hi,
> > 
> > \> Can any tell me why I am getting the error: "syntax error, unexpected  
> > \> '=', expecting tASSOC" for the below hash please?
> > 
> > \> tem\_urls = {  
> > \> :home\_page =\> website\_root , :rm\_footage =\>  
> > \> "#{website\_root}/gallery/home/rightsmanaged.do",  
> > \> :rushes =\> "#{website\_root}/gallery/home.do", :rt\_footage  
> > \> ="#{website\_root}/gallery/home/royaltyfree.do"  
> > \> }
> > 
> > :rt\_footage ="#{website\_root}/gallery/home/royaltyfree.do"  
> > ^^^  
> > The last key-value pair is "just" an "=", and not the expected "=\>".
> > 
> > --  
> > Phillip Gawlowski

---

<div class="post-metadata">

**Author:** ![Phillip\_Gawlowski1](https://avatars.discourse-cdn.com/v4/letter/p/f17d59/32.png) [@Phillip\_Gawlowski1](https://rubytalk.org/u/Phillip_Gawlowski1)\
**Post date:** [14 January 2010 21:40 UTC](https://rubytalk.org/t/hash-expecting-tassoc/57006/4 "2010-01-14T21:40:55Z")

</div>

Don't you worry. 🙂

I've noticed that all other key/value pairs have a space around the =\>, and the last one didn't. So, your typo was drowned in the noise, as it were.

> **···**
>
> On 14.01.2010 22:36, aidy wrote:
> 
> > Apologies for being an idiot
> 
> --  
> Phillip Gawlowski
