• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can you run Ruby Scripts via get shell?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can you run Ruby Scripts via get shell?


  • Subject: Re: Can you run Ruby Scripts via get shell?
  • From: "Mark J. Reed" <email@hidden>
  • Date: Sat, 17 Mar 2007 17:53:54 -0400

If you type

ruby -e 'vince'.capitalize

in a Terminal window, that won't work either.  By the time Ruby sees
the command it's just

vince.capitalize

and the identifier vince isn't defined, so you get an error.

You need to quote the entire argument to -e, independent of any
quotation marks you use inside it:

ruby -e 'puts "vince".capitalize'

works in a terminal window or via do shell script.



On 3/17/07, Vince Angeloni <email@hidden> wrote:
I'm just tinkering around with Ruby and I'm a total Ruby noob. I'm
able to run Ruby scripts using saved "shell script" files made
executable, but I'm not able to get a short script to run "on the fly".

Using the following as the shell script errors:
ruby -e 'vince'.capitalize

Has anyone tried this? What's the secret?

TIA
vince
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden



--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Can you run Ruby Scripts via get shell?
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Can you run Ruby Scripts via get shell? (From: Vince Angeloni <email@hidden>)

  • Prev by Date: Can you run Ruby Scripts via get shell?
  • Next by Date: Re: Can you run Ruby Scripts via get shell?
  • Previous by thread: Can you run Ruby Scripts via get shell?
  • Next by thread: Re: Can you run Ruby Scripts via get shell?
  • Index(es):
    • Date
    • Thread