---
title: "netbeans 6 B1 版本升级了 RAILS到1.2.25后的报错恢复"
author: "ron"
date: "2007-10-17T00:19:26Z"
tags: []
slug: "netbeans-6-b1-rails-1-2-25"
draft: false
lastmod: "2007-10-17T00:19:26Z"
id: 132707
url: "https://ron.iteye.com/blog/132707"
---

**症状：**  
突然之间，用NETBEANS 6 BETA 1 的generate命令报错如下：  
Pathname's realpath method was not properly handling drive letters in Windows, causing Rails initialization to fail in Edge (1.2.3.x) with errors like:  
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)  
from C:/jruby/jruby-1.0.1/lib/ruby/1.8/pathname.rb:453:in \`realpath'  
from C:/jruby/jruby-1.0.1/lib/ruby/gems/1.8/gems/rails-1.2.3.7605/lib/initializer.rb:494:in \`set\_root\_path!'  
from C:/jruby/jruby-1.0.1/lib/ruby/gems/1.8/gems/rails-1.2.3.7605/lib/initializer.rb:459:in \`initialize'  
from ./script/../config/boot.rb:44:in \`new'  
from ./script/../config/boot.rb:44:in \`run'  
from ./script/../config/boot.rb:44  
from :1:in \`require'  
from :1

attached test shows failure in windows, patch fixes.

**分析：**  
经分析是因为工具使用的jruby对rails的新版本兼容错误，详细见：http://jira.codehaus.org/browse/JRUBY-1401

**解决方案：**  
卸载NETBEANS工具，并重装，让它恢复到RAILS的1.2.23版本。