Stamp: 21 August 2008 | 6 Comments | Back to Previous Page
ADVERTISEMENTS
Maybe you're curious about the title. Let me explain it in a brief and short way: with Ruby already installed on Mac, you can install a ruby script to grab Quote of the Day into your Terminal.
Perhaps it sounds difficult for you, but actually it's really easy. Everyone can definitely do it.
Here are the steps:
- Download this Ruby Script
- Put that file into your Home folder
- Open your Terminal and type vim ~/.bash_profile
- Press character I to go to Insert Mode and insert ruby quote_of_the_day.rb into the end of the file
- Quit Insert Mode by pressing Escape key
- Type :wq to save the changes to the file and exit vim mode
- Relaunch your Terminal and now you should be able to see the quote of the day
You will never know what will happen before you try it.
You will never understand what has happened before you apply it.
This post is the contribution of James. Thanks a lot for his nifty trick.
Categories: UNIX, Open Source | Post Comment | Back to Top
Related Entries:





6 Comments
robbie
ruby quote_of_the_day.rb | growlnotify -s -t "Words of Wisdom" Is quite nice too. set mine up as a cron job in the morning. as a cron entry (crontab -e) use: ruby quote_of_the_day.rb | growlnotify -s -t "Words of Wisdom" > /dev/null 2>&1 ps, thanks for the nice site ;)
Reply | Back to Top
Alex
very nice!
Reply | Back to Top
Robin
I followed your directions to the letter, and verified that the file was in my home directory, but it doesn't load, and I get this error in terminal now: "quote_of_the_day.rb:1:in `require': No such file to load -- rubygems (LoadError) from quote_of_the_day.rb:1" Any thoughts? This seems like a cool thing, so any suggestions would be great - thanks!
Reply | Back to Top
james
Hi Robin, It seems like you are missing ruby gems. You can follow following steps to install rubygem 1. Download http://rubyforge.org/frs/download.php/38647/rubygems-1.2.0.zip ( right click, save target as ) 2. Unzip rubygems-1.2.0.zip to any folder as long as you can cd to the folder 3. From terminal type cd <path where folder extract to rubygems-1 you> 4. Finally, type ruby setup.rb 5. After finish setting up, try the thing again =) Hope it helps :) James
Reply | Back to Top
'Ley
Although I live this but does anyone know if it is possible to make rfksay the quotes?
Reply | Back to Top
Lou
@Ley: Seems to work with: say ` ruby quote_of_the_day.rb ` Note that those "quotes" are actually the resolution quotes on the ~ (tilde) key. Lou
Reply | Back to Top
Post a Comment
You can't be anonymous
C'mon, I'm sure you've got something to say.