Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Getting a Ruby script to run on a colleague's Mac

Reply
Thread Tools

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

 
 
Sharon
Guest
Posts: n/a
 
      05-23-2007
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.

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Keynan Pratt
Guest
Posts: n/a
 
      05-24-2007
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

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Morton Goldberg
Guest
Posts: n/a
 
      05-24-2007
On May 23, 2007, at 6:33 PM, Sharon wrote:

> 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'm surprised, but I know nothing about Ruby on Windows. On my iMac,

require 'rss/2.0'

works.

Regards, Morton



 
Reply With Quote
 
highlyjhi
Guest
Posts: n/a
 
      05-24-2007
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?

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

> 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.
>
> --
> Posted via http://www.ruby-forum.com/.
>



 
Reply With Quote
 
matt neuburg
Guest
Posts: n/a
 
      05-24-2007
Sharon <(E-Mail Removed)> wrote:

> 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.


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.

--
matt neuburg, phd = http://www.velocityreviews.com/forums/(E-Mail Removed), http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com
 
Reply With Quote
 
Sharon Machlis
Guest
Posts: n/a
 
      05-24-2007
unknown wrote:
> Sharon <(E-Mail Removed)> 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!



--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Dave Rose
Guest
Posts: n/a
 
      05-24-2007
Sharon Machlis wrote:
> unknown wrote:
>> Sharon <(E-Mail Removed)> 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

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
matt neuburg
Guest
Posts: n/a
 
      05-24-2007
Sharon Machlis <(E-Mail Removed)> wrote:

> unknown wrote:
> > Sharon <(E-Mail Removed)> 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.


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

--
matt neuburg, phd = (E-Mail Removed), http://www.tidbits.com/matt/
Tiger - http://www.takecontrolbooks.com/tiger-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
run a script getting 4 arguments from another script souleymane yo Python 1 07-23-2011 12:19 AM
(How) Can you run another ruby script, from a ruby script? 3lionz Wexler Ruby 2 08-24-2010 04:27 AM
Run a Ruby script (.rbw) from a dock shortcut in Mac OS X (Leopard)? kpkilburn@gmail.com Ruby 8 03-23-2009 03:09 PM
Mac: Perl script that will run when double-clicked amirkarger@gmail.com Perl Misc 7 09-03-2007 01:46 AM
getting a windows java program to run on a mac and different java version Eric Java 4 02-18-2004 06:45 PM



Advertisments