Ruby文件从终端运行但不是从Sublime文本运行

时间:2014-06-25 11:41:06

标签: ruby sublimetext

Ruby新手。 如何从Sublime Text -3运行ruby,它从终端正常运行但在ST中给出错误,如下所述 -

我安装了Ruby 1.9.x,Sublime Text-3能够使用Shift + Ctrl + B运行ruby文件。 然后我升级到2.1.2,按照文章中的步骤安装宝石,更新路径等等。现在,当我从终端触发它们时,我的ruby文件正常运行。但是当我尝试从ST-3跑时,我得到了:

/usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- watir-webdriver (LoadError)
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/xxx/UI_Automation/spec/basic_test.rb:1:in `<main>'
[Finished in 0.0s with exit code 1]
[shell_cmd: ruby "/home/xxx/UI_Automation/spec/basic_test.rb"]
[dir: /home/techdigita/UI_Automation/spec]
[path: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games]

注意:同一程序从终端运行。就像我说我对Ruby所知道的那样我只是按照步骤来更新GEM_PATH,GEM_HOME等而没有多想。我已经从1.8更新到1.9而没有任何此类问题。感谢您的期待。

0 个答案:

没有答案