在netbeans 6 ruby ide beta里面,如果使用jruby 1.0.2 并且rails升級到1.2.5,就會出錯如:
          C:/jruby/jruby-1.0.1/lib/ruby/1.8/pathname.rb:420:in `realpath_rec': No such file or directory - C:/railstest/C: (Errno::ENOENT)
          ....

          避免的辦法可以重新裝netbeans 6 ruby ide并使用rails1.2.3

          或者是在此處下載一個patch,
          http://jira.codehaus.org/browse/JRUBY-1401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

          patch的使用方法就是按照patch里面的說明來對pathname.rb原文件修改:

          Index: pathname.rb

          ===================================================================

          --- pathname.rb (revision 4471)

          +++ pathname.rb (working copy)

          @@ -285,6 +285,8 @@

             def prepend_prefix(prefix, relpath)
               if relpath.empty?
                 File.dirname(prefix)
          +    elsif prefix =~ /^[a-zA-Z]:$/
          +      File.join(prefix,relpath)
               elsif /#{SEPARATOR_PAT}/ =~ prefix
                 prefix = File.dirname(prefix)
                 prefix = File.join(prefix, "") if File.basename(prefix + 'a') != 'a'
          @@ -408,6 +410,8 @@

                   next
                 elsif n == '..'
                   resolved.pop
          +      elsif n =~ /^[a-zA-Z]:$/
          +        resolved << n
                 else
                   path = prepend_prefix(prefix, File.join(*(resolved + [n])))
                   if h.include? path
          @@ -446,7 +450,9 @@

             def realpath
               path = @path
               prefix, names = split_names(path)
          -    if prefix == ''
          +    if prefix == '' && names[0] =~ /^[a-zA-Z]:$/
          +      prefix = names.shift
          +    elsif prefix == ''
                 prefix, names2 = split_names(Dir.pwd)
                 names = names2 + names
               end

          很直觀,+就表示加多的內容,-就是表示減少的內容
          posted on 2007-11-14 17:19 lzj520 閱讀(282) 評論(0)  編輯  收藏 所屬分類: 個人學習日記ROR
          主站蜘蛛池模板: 菏泽市| 渝北区| 梁平县| 青阳县| 珲春市| 翁牛特旗| 陵水| 类乌齐县| 通城县| 富平县| 商洛市| 门源| 梨树县| 宿松县| 嵊泗县| 乌海市| 土默特左旗| 莫力| 浪卡子县| 繁峙县| 兴义市| 江北区| 平阴县| 女性| 汉寿县| 金门县| 沧州市| 临澧县| 田东县| 齐河县| 界首市| 聂荣县| 泰州市| 万源市| 兴隆县| 柘荣县| 富宁县| 轮台县| 敦化市| 磐安县| 平邑县|