How to run Ruby scripts in Geektool?

被刻印的时光 ゝ 提交于 2019-12-11 23:21:29
问题 I want to run a Ruby script in Geektool that refreshes every 3 hours (so I set the refresh rate to 10,800 seconds) and the shell command in Geektool has this code in it: ruby "/file.rb" The file is located at root for convenience. Problem is, it won't run. I tried different commands, such as: /Users/userhere/.rvm/rubies/ruby-1.9.3-p0/bin/ruby /file.rb But it still doesn't work. I don't want it to use my /usr/bin/ruby installation (which, by default, is 1.8.7), I want it to use 1.9.3. So doing

Ruby, Mac, Geektool question, file access rights?

谁说胖子不能爱 提交于 2019-12-02 11:06:21
问题 I have a Ruby script that I built in TextMate and can successfully run in TextMate. I can also successfully run this script straight from the terminal. The script has this chunk of code in it: # Get the XML file puts 'Opening the file' open("messages.xml", "r") do |f| puts 'File is opened' theXML = Hpricot::XML(f) puts 'Trying to get the message_entity' message_entity = GetMessage(theXML) # Build the system command puts 'Getting the author and the message' theAuthor =