[Geany] Geany can't locate ruby interpreter
Matthew Brush
mbrush at xxxxx
Mon Mar 19 23:12:00 UTC 2012
On 12-03-19 02:23 PM, Peter Smrčák wrote:
>
> hi,
>
> I'm currently running on Ubuntu 12.04.
>
>
> If i want to run a ruby script:
> ./geany_run_script.sh: 5: ./geany_run_script.sh: ruby: not found
>
> Geany can't locate ruby interpreter because it's stored in
> /home/lux/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
>
> Well... it looks like i have to tell Geany where to find ruby
> internepreter, do you know how?
> Thx a lot.
Hi,
There's a few ways you can do this, the easiest probably being setting
the Build Command[1] to use the full path of the Ruby interpreter.
Alternatively you could use the shebang in your ruby script to point to
the correct interpreter. Lastly you could put the path of the Ruby
interpreter into your $PATH environment variable.
If you chose the first option (best IMO), you'd set the Execute command
to something like this:
/home/lux/.rvm/rubies/ruby-1.9.3-p125/bin/ruby "%f"
The second option, you'd change the first line of you Ruby script to
something like this:
#!/home/lux/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
And the third option, you'd adjust your PATH environment variable
something like this, before running Geany:
PATH="$PATH:/home/lux/.rvm/rubies/ruby-1.9.3-p125/bin" geany
Cheers,
Matthew Brush
[1]
http://www.geany.org/manual/current/index.html#build-menu-commands-dialog
More information about the Users
mailing list