# Getting a Ruby script to run on a colleague's Mac

**URL:** <https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934>\
**Category:** Ruby\
**Created:** [May 24, 2007, 12:33am UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934 "2007-05-24T00:33:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [May 24, 2007, 12:33am UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934/1 "2007-05-24T00:33:24Z")

</div>

I wrote a Ruby script that’s working fine on my own Windows machine at  
work. I wanted to share it with a colleague who uses a Mac at the  
office, but I can’t get it to run.

The script needs several libraries, including the rss library.

On my Windows machine, the script says

require ‘rss’

and that works fine. I found the location of Ruby files on her machine,  
but

require ‘/usr/lib/ruby/1.8/rss’

gives me an error that there’s no such file. If I use

require ‘/usr/lib/ruby/1.8/rss/rss.rb’

then the script finds that file but starts throwing other errors.

I have included #! /usr/in/env ruby

at the top of the script

Installing Ruby on her machine, instead of using the already installed  
version, isn’t an option.

Thanks for any help you can offer. I’m not really familiar with Mac OS  
X.

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [May 24, 2007, 2:09am UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934/2 "2007-05-24T02:09:02Z")

</div>

Which begs the the question why cant you reinstall the ruby interpreter  
as well as does your colleague have ruby gems installed?

For that matter what are these other errors you mention and how are we  
supposed to without knowing?

Mac OS is effectively a non-locked down Linux with a windowsy interface

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [May 24, 2007, 2:12am UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934/3 "2007-05-24T02:12:38Z")

</div>

On May 23, 2007, at 6:33 PM, Sharon wrote:

> and that works fine.  
> I’m surprised, but I know nothing about Ruby on Windows. On my iMac,

```
require 'rss/2.0'

```

works.

Regards, Morton

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [May 24, 2007, 5:30am UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934/4 "2007-05-24T05:30:51Z")

</div>

Sharon [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> and that works fine. I found the location of Ruby files on her machine,  
> but
> 
> require ‘/usr/lib/ruby/1.8/rss’
> 
> gives me an error that there’s no such file.

Why are you not saying simply require ‘rss’ just as in Windows? That  
works fine on my Mac; require ‘/usr/lib/ruby/1.8/rss’ does not. m.

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [May 24, 2007, 4:22am UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934/5 "2007-05-24T04:22:47Z")

</div>

I had the same problem with the RSS. Since 10.4 comes with Ruby 1.8.2  
(which doesn’t have the RSS class) you’ll need to update Ruby in  
order for your script to work. Why is that not an option for your  
colleague?

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [May 24, 2007, 5:14pm UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934/6 "2007-05-24T17:14:43Z")

</div>

unknown wrote:

> Sharon [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > and that works fine. I found the location of Ruby files on her machine,  
> > but
> > 
> > require ‘/usr/lib/ruby/1.8/rss’
> > 
> > gives me an error that there’s no such file.
> 
> Why are you not saying simply require ‘rss’ just as in Windows? That  
> works fine on my Mac; require ‘/usr/lib/ruby/1.8/rss’ does not. m.

Thanks for letting me know how it works on your Mac. I changed to the  
full path because when I tried

require ‘rss’

I got an error message saying there was no file with that name. And  
changing to the full path made that error message go away, so I was  
guessing that perhaps the full path was needed.

Based on the previous message, it sounds like I’ll need to see if I can  
update Ruby on my colleague’s Mac.

Thanks for all the suggestions. I’ll investigate further. Otherwise, I’m  
afraid I’m going to have to rewrite the script in Perl (which I’m a lot  
more familiar with) and then put it on an internal server (as far as I  
know, I don’t have access to a server here that has Ruby). The point of  
this whole exercise was to start learning Ruby. At least I got the  
script working on my own system!

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [May 24, 2007, 9:02pm UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934/7 "2007-05-24T21:02:06Z")

</div>

Sharon M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Why are you not saying simply require ‘rss’ just as in Windows? That  
> > works fine on my Mac; require ‘/usr/lib/ruby/1.8/rss’ does not. m.
> 
> Thanks for letting me know how it works on your Mac. I changed to the  
> full path because when I tried
> 
> require ‘rss’
> 
> I got an error message saying there was no file with that name. And  
> changing to the full path made that error message go away, so I was  
> guessing that perhaps the full path was needed.

I’m going to guess that the problem is that your friend has never  
installed the Developer Tools (Xcode). m.

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [May 24, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934/8 "2007-05-24T18:13:32Z")

</div>

Sharon M. wrote:

> unknown wrote:
> 
> > Sharon [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > and that works fine. I found the location of Ruby files on her machine,  
> > > but
> > > 
> > > require ‘/usr/lib/ruby/1.8/rss’
> > > 
> > > gives me an error that there’s no such file.
> > 
> > Why are you not saying simply require ‘rss’ just as in Windows? That  
> > works fine on my Mac; require ‘/usr/lib/ruby/1.8/rss’ does not. m.
> 
> Thanks for letting me know how it works on your Mac. I changed to the  
> full path because when I tried
> 
> require ‘rss’
> 
> I got an error message saying there was no file with that name. And  
> changing to the full path made that error message go away, so I was  
> guessing that perhaps the full path was needed.
> 
> Based on the previous message, it sounds like I’ll need to see if I can  
> update Ruby on my colleague’s Mac.
> 
> Thanks for all the suggestions. I’ll investigate further. Otherwise, I’m  
> afraid I’m going to have to rewrite the script in Perl (which I’m a lot  
> more familiar with) and then put it on an internal server (as far as I  
> know, I don’t have access to a server here that has Ruby). The point of  
> this whole exercise was to start learning Ruby. At least I got the  
> script working on my own system!

a couple of things sharon…  
1.) what ruby version do you have and your mac friend have (are they  
different)  
3.) $LOAD\_PATH inside of IRb  
4.) ENV chk inside of IRB  
5.) do a LS of the MAC and check the acl of the RSS library inside a cmd  
prompt

---

<div class="post-metadata">

**Author:** ![sharon](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/67e7ee/32.png) [@sharon](https://www.ruby-forum.com/u/sharon)\
**Post date:** [May 25, 2007, 6:11am UTC](https://www.ruby-forum.com/t/getting-a-ruby-script-to-run-on-a-colleagues-mac/104934/9 "2007-05-25T06:11:01Z")

</div>

matt neuburg [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > gives me an error that there’s no such file.  
> > > > changing to the full path made that error message go away, so I was  
> > > > guessing that perhaps the full path was needed.
> 
> I’m going to guess that the problem is that your friend has never  
> installed the Developer Tools (Xcode). m.

I taking back my guess. I tried a clean system install and sure enough,  
require ‘rss’ doesn’t work. Then I installed Ruby 1.8.6, and it worked  
fine. It’s a pity you’re not willing to update your friend’s Ruby; it  
takes only a few minutes to do. m.
