# Please help...those who know ruby!

**URL:** <https://www.ruby-forum.com/t/please-help-those-who-know-ruby/53754>\
**Category:** Ruby-Forum\
**Created:** [February 14, 2006, 8:02am UTC](https://www.ruby-forum.com/t/please-help-those-who-know-ruby/53754 "2006-02-14T08:02:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brenda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecd19e/32.png) [@brenda](https://www.ruby-forum.com/u/brenda)\
**Post date:** [February 14, 2006, 8:02am UTC](https://www.ruby-forum.com/t/please-help-those-who-know-ruby/53754/1 "2006-02-14T08:02:30Z")

</div>

why is it that line 3 of this code will get an error:

“You have a nil object when you didn’t expect it!  
The error occured while evaluating nil.Workstation\_name”

1:

# Inventory Files
  
2:  
3: \<%= @inventoryfile.Workstation\_name %\>  
4: Location:\<%= @workstationfile.Location %\>

pls…help!!!111

---

<div class="post-metadata">

**Author:** ![brenda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ecd19e/32.png) [@brenda](https://www.ruby-forum.com/u/brenda)\
**Post date:** [February 17, 2006, 1:23pm UTC](https://www.ruby-forum.com/t/please-help-those-who-know-ruby/53754/2 "2006-02-17T13:23:43Z")

</div>

brenda wrote:

> why is it that line 3 of this code will get an error:
> 
> “You have a nil object when you didn’t expect it!  
> The error occured while evaluating nil.Workstation\_name”
> 
> 1:
> 
> # Inventory Files
>   
> 2:  
> 3: \<%= @inventoryfile.Workstation\_name %\>  
> 4: Location:\<%= @workstationfile.Location %\>
> 
> pls…help!!!111

If Ruby tries to evaluate nil.Workstation\_name, it means that  
@workstationfile=nil.  
In other words, this instance variable doesn’t exist. You may be missing  
some initialization…
