![]() So the issue is with including mechanize in the script. Then the script runs correctly and due to exception the following output is displayed : StackOverflow : I have done some debugging and found that if I remove the line ![]() This command will work on GeekTool shell and display hello correctly : /Users/cyclotrojan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/cyclotrojan/Desktop/Snippets/test.rb I know that the problem is not with detecting ruby, since I tested it out using another file test.rb File test.rb puts "hello" However, the output simply doesnt show up on my desktop. Print "\tFollowers : " tw_followers "\n" Print " Total Badges : " so_badges "\n" Print " Reputation is : " so_reputation "\n" So_reputation = so_page.link_with(:href => "/users/898346/cyclotrojan?tab=reputation").to_s GeekTool (someone else's great program) is a Mac system preference pane application that puts things on your desktop background, where things are images, files, and scripts (my favorite). Here is the script : File get_so_reputation_and_tw_followers.rb require 'mechanize' However when I paste the same command on a geektool shell, no output comes. Now I wish to display the output of my script on my desktop using GeekTools and set refresh time to 30 minutes, so it keeps running the script over and over thus updating my stats. The output is correctly displayed like this on the terminal: StackOverflow : I run this command on the terminal first : /Users/cyclotrojan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/cyclotrojan/Desktop/Snippets/get_so_reputation_and_tw_followers.rb I have written a working ruby script using mechanize for fetching my
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |