每当我尝试通过 .rb 保存和运行 .rb 文件时Sublime Text2
,都会出现错误:
Unable to save /usr/Examples/SO.rb
以及以下内容:
[Errno 2] No such file or directory
[cmd: [u'ruby', u'/usr/Examples/SO.rb']]
[dir: /usr/Examples]
[path: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games]
[Finished]
谁能帮我解决这个问题?
编辑
2.0.0p0 :001 > puts ENV['PATH']
/home/kirti/.rvm/gems/ruby-2.0.0-p0/bin:/home/kirti/.rvm/gems/ruby-2.0.0-p0@global/bin:/home/kirti/.rvm/rubies/ruby-2.0.0-p0/bin:/home/kirti/.rvm/gems/ruby-2.0.0-p0/bin:/home/kirti/.rvm/gems/ruby-2.0.0-p0@global/bin:/home/kirti/.rvm/rubies/ruby-2.0.0-p0/bin:/home/kirti/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/kirti/.rvm/bin
=> nil
kirti@kirti-Aspire-5733Z:~$ which ruby
/home/kirti/.rvm/bin/ruby