I have copy this code http://pastie.org/322423 in a ruby file and issue the command
$ ruby ruby_file_name < rails_project_path >
this command created a directory nbproject in my rails project and now i am able to browse the rails project from netbeans.
Or
Other way is use Netbeans interface to open
New Project(Ctrl+Shift+N) -> Choose Project -> Ruby on Rails Application with Existing Sources .
Now browse the Project directory.
It will open your Rails project in Netbeans.