从其他分区加载文件

时间:2015-10-01 18:51:13

标签: ruby disk-partitioning load-path

我在 var math = new function() { var $this = this; $this.Factorial = function(n) { if (n == 0) { return 1; } return n * $this.Factorial(n - 1); } } $("#calcButton").click(function() { var myValue = document.getElementById('myTextBox').value; if (myValue.length == 0) { alert("Please input the correct value!"); return; } var result = math.Factorial(myValue); document.getElementById('title').innerHTML = result; }) 工作,我需要在C:\(...)\Desktop require我的脚本。我试图更改G:\scripts

$LOAD_PATH

以及$LOAD_PATH << 'G:\\scripts' require 'filename' 的参数:

require

但我总是得到

require 'G:\\scripts\\filename'

如果目录位于C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- dir_iterator (LoadError) from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from a.rb:2:in `<main>' 分区,则效果很好。这里发生了什么?

0 个答案:

没有答案