0

I've been running programs from scite and it's no longer working. I get the error message sh: ruby: not found even when I write a simple test program like puts "hello".

When I pull up the Ruby properties in SciTe I find this:

if PLAT_WIN
command.go.*.rb=ruby $(FileNameExt)
command.go.subsystem.*.rb=1
command.go.*.rbw=rubyw $(FileNameExt)
command.go.subsystem.*.rbw=1
command.help.*.rb=$(CurrentWord)!c:\apps\ruby\ProgrammingRuby.chm
command.help.subsystem.*.rb=4

if PLAT_GTK command.go.*.rb=ruby $(FileNameExt)

command.name.1.*.rb=Check Syntax
command.1.*.rb=ruby -cw $(FileNameExt)

command.name.2.*.rb=Code Profiler
command.2.*.rb=ruby -r profile $(FileNameExt)
Bodhidarma
  • 519
  • 1
  • 7
  • 25
  • I really haven't changed anything. I had scite open last night with the program written inside it. Everything was working fine. When i awoke scite was mysteriously closed. I reopened it. Reopened the file. Built the code. And it didn't work anymore. As far as checking to see if your question about what runcode starts with I'm unsure of how to check if it starts with #!/usr/bin/ruby to my knowledge it's just under myusername/RubyProjects/runcode2.rb. Sorry if this comment belays some newbish foolishness, as it probably does. – Bodhidarma Jun 25 '11 at 19:03
  • Solved... I simply uninstalled and reinstalled SciTe. I have no idea what the issue what but I found a solution at least. – Bodhidarma Jun 25 '11 at 19:58
  • The solution was temporary. I restarted my computer and once again I started receiving the same error message when trying to run my programs and re-installation no longer works to solve the problem. – Bodhidarma Jun 29 '11 at 17:07

1 Answers1

1

Can you check the ruby-properties in scite?

In Scite: Options -> Open ruby properties

Then look for the definition with 'command.go'

It should look similar to this:

command.compile.*.rb=call ocra $(FileNameExt)
command.build.*.rb=c:\program files\ruby19\bin\ruby -w $(FileNameExt)
command.go.*.rb=c:\program files\ruby19\bin\ruby $(FileNameExt)

Check the path you defined in the properties with your settings.

knut
  • 27,320
  • 6
  • 84
  • 112
  • if PLAT_WIN command.go.*.rb=ruby $(FileNameExt) command.go.subsystem.*.rb=1 command.go.*.rbw=rubyw $(FileNameExt) command.go.subsystem.*.rbw=1 command.help.*.rb=$(CurrentWord)!c:\apps\ruby\ProgrammingRuby.chm command.help.subsystem.*.rb=4 if PLAT_GTK command.go.*.rb=ruby $(FileNameExt) command.name.1.*.rb=Check Syntax command.1.*.rb=ruby -cw $(FileNameExt) command.name.2.*.rb=Code Profiler command.2.*.rb=ruby -r profile $(FileNameExt) – Bodhidarma Jun 29 '11 at 16:51
  • You set no absolute path to you ruby installation (that's ok). Did you test if ruby is found from shell/DOS-Box? If not, then please check your PATH-settings. – knut Jun 29 '11 at 18:09
  • I'm unsure of how to check my PATH-settings or to check if ruby is found from the shell/DOS-Box. I'm sorry, but could tell me a bit more about how to do this? Also, I never set any path. It worked perfectly then i restarted my computer and it broke. – Bodhidarma Jun 29 '11 at 19:22
  • Which system are you running? Linux or Windows (which one?)? If window: Please take a look at http://www.c3scripts.com/tutorials/msdos/open-window.html and try the command 'ruby' What happens? if you get an error like 'programm not found' this may be the problem. – knut Jun 29 '11 at 19:49
  • Just an idea: Do you know, where your ruby.exe is? Replace 'ruby' in command.go in your properties file with the path, where your ruby.exe is. Then try again to execute your script. – knut Jun 29 '11 at 19:52
  • I'm running Linux. When I type find ruby.exe into the command line it says there is no such file. Thanks for the help thus far. – Bodhidarma Jun 29 '11 at 22:02
  • With Linux you don't have the '.exe'. Just try 'ruby'. If it is not found, do you know where your ruby is installed? If yes, try to set the absolute path in your scite-properties (I think after 'PLAT_GTK'.) – knut Jun 30 '11 at 19:20