This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Erno, Capistrano (http://www.capify.org) seems to be the way for deploying with Rails projects. Unfortunately, Capfile is not seen under "Projects Tab". Here are 3 small modifications to allow this : diff -r c9663ea487db ruby.project/src/org/netbeans/modules/ruby/rubyproject/RubyProjectOperations.java --- a/ruby.project/src/org/netbeans/modules/ruby/rubyproject/RubyProjectOperations.java Wed Oct 07 11:11:16 2009 +0200 +++ b/ruby.project/src/org/netbeans/modules/ruby/rubyproject/RubyProjectOperations.java Wed Oct 07 15:35:40 2009 +0200 @@ -83,6 +83,7 @@ FileObject projectDirectory = project.getProjectDirectory(); List<FileObject> files = new ArrayList<FileObject>(); addFile(projectDirectory, "nbproject", files); // NOI18N + addFile(projectDirectory, "Capfile", files); // NOI18N addFile(projectDirectory, "README", files); // NOI18N addFile(projectDirectory, "LICENSE", files); // NOI18N return files; diff -r c9663ea487db ruby/src/org/netbeans/modules/ruby/ruby-mime-resolver.xml --- a/ruby/src/org/netbeans/modules/ruby/ruby-mime-resolver.xml Wed Oct 07 11:11:16 2009 +0200 +++ b/ruby/src/org/netbeans/modules/ruby/ruby-mime-resolver.xml Wed Oct 07 15:35:29 2009 +0200 @@ -61,6 +61,7 @@ <!-- Filename matches exactly rakefile or Rakefile. --> <name name="rakefile" ignorecase="false"/> <name name="Rakefile" ignorecase="false"/> + <name name="Capfile" ignorecase="false"/> <resolver mime="text/x-ruby"/> </file> <file> diff -r c9663ea487db ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/SourceRoots.java --- a/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/SourceRoots.java Wed Oct 07 11:11:16 2009 +0200 +++ b/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/SourceRoots.java Wed Oct 07 15:34:54 2009 +0200 @@ -155,6 +155,10 @@ if (readme != null) { plainFiles.add(readme); } + FileObject capfile = fo.getFileObject("Capfile"); // NOI18N + if (capfile != null) { + plainFiles.add(capfile); + } // show app/metal for Rack applications, but only if the folder already exists boolean metal = fo.getFileObject("app/metal") != null;//NOI18N Of course a better integration should be to launch Capistrano from the file or the project, but right now, I have no time to implement this.
Oups, sorry I've made a mistake, please ignore the first patch, it was when I testing it with ruby projects not rails. Here is the correct one : diff -r c9663ea487db ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/RailsProjectOperations.java --- a/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/RailsProjectOperations.java Wed Oct 07 11:11:16 2009 +0200 +++ b/ruby.railsprojects/src/org/netbeans/modules/ruby/railsprojects/RailsProjectOperations.java Wed Oct 07 15:34:42 2009 +0200 @@ -100,6 +100,7 @@ // additional files addFile(project.getProjectDirectory(), "README", files); // NOI18N addFile(project.getProjectDirectory(), "Rakefile", files); // NOI18N + addFile(project.getProjectDirectory(), "Capfile", files); // NOI18N return new ArrayList<FileObject>(files); }
Thanks! I'll integrate the patch soon (once our repos are back up).
Patch integrated in 03cf16bb9a84.
Integrated into 'main-golden', will be available in build *200910100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/03cf16bb9a84 User: Erno Mononen <emononen@netbeans.org> Log: #173977: Add Capfile (for Capistrano) to Rails Project - thanks to ehartmann for the patch
Issue added to list [1] of community fixed bugs. [1] http://wiki.netbeans.org/NetFIXIssues