# Simple question re: require

**URL:** <https://rubytalk.org/t/simple-question-re-require/4435>\
**Category:** ruby-talk\
**Created:** [31 January 2003 07:42 UTC](https://rubytalk.org/t/simple-question-re-require/4435 "2003-01-31T07:42:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dwayne\_Smurdon](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@Dwayne\_Smurdon](https://rubytalk.org/u/Dwayne_Smurdon)\
**Post date:** [31 January 2003 07:42 UTC](https://rubytalk.org/t/simple-question-re-require/4435/1 "2003-01-31T07:42:16Z")

</div>

Ok, I have a class that compiles called OutlookContact. In another class,  
called DBConn, I want to create an instance of that class.

So in DBConn, I have:

require 'win32ole’  
require ‘OutlookContact’  
#… and then I start my code.

When I try to compile DBConn – I get the following:

D:/Apps/Ruby/projects/DbConn.rb:2:in `require’: ./OutlookContact.rb:19:  
parse error (SyntaxError)  
from D:/Apps/Ruby/projects/DbConn.rb:2

For clarification, line 2 is the require statement for OutlookContact above.

Any help sorting this out would be appreciated. I did read the section  
called “Including Other Files” in  
[http://www.rubycentral.com/book/tut\_modules.html](http://www.rubycentral.com/book/tut_modules.html) … but I’m probably  
thinking too much like java.

-Dwayne

---

<div class="post-metadata">

**Author:** ![Yukihiro\_Matsumoto2](https://avatars.discourse-cdn.com/v4/letter/y/b9e5f3/32.png) [@Yukihiro\_Matsumoto2](https://rubytalk.org/u/Yukihiro_Matsumoto2)\
**Post date:** [31 January 2003 08:56 UTC](https://rubytalk.org/t/simple-question-re-require/4435/2 "2003-01-31T08:56:50Z")

</div>

Hi,

> **···**
>
> In message “simple question re: require” on 03/01/31, “Dwayne Smurdon @ DNA Media Pro” [smurdon@dnamediapro.com](mailto:smurdon@dnamediapro.com) writes:
> 
> > So in DBConn, I have:
> > 
> > require ‘win32ole’  
> > require ‘OutlookContact’  
> > #… and then I start my code.
> > 
> > When I try to compile DBConn – I get the following:
> > 
> > D:/Apps/Ruby/projects/DbConn.rb:2:in `require’: ./OutlookContact.rb:19: parse error (SyntaxError)  
> > from D:/Apps/Ruby/projects/DbConn.rb:2
> > 
> > For clarification, line 2 is the require statement for OutlookContact above.
> 
> You have a syntax error in ./OutlookContact.rb line 19.
> 
> ```
> matz.
> 
> ```
