After the upgrade to Rails 2.3.2, Rails projects are not detected as known module types by v3 Prelude.
Apparently the sniffer depends on file layout and the like... when Rails changed the way their projects are laid out,
the sniffer is unable to detect that a Rails project is a Rails project...
This is tracked by the server team as https://glassfish.dev.java.net/issues/show_bug.cgi?id=7384
Here is some data from Vivek about the state of v3 Prelude and Rails 2.3.2
Well, a quick run tells that there are other issues as well. Past RailsSniffer, during request processing,
RailsGrizzlyAdapter in v3 tries to work thru ActionController::AbstractRequest to wire HTTP request/respnse streams it
gets from Grizzly. This class is removed in Rails 2.3.2, now it is called ActionController::Request :-(
SEVERE: uninitialized constant ActionController::AbstractRequest
`load_missing_constant': uninitialized constant ActionController::AbstractRequest (NameError)
from <script>:59:in `service'
...internal jruby stack elided...
Vivek Pandey wrote:
> vince kraemer wrote:
>> Vivek Pandey wrote:
>>> vince kraemer wrote:
>>>> I am still very interested in finding out what prevents v3 Prelude from recognizing/running apps created with Rails
>>>> I would hate to think that we are going to re-write a major portion of the GF v3 integration plugin because of the
failure of a single if statement in v3 Prelude's Ruby/Rails support...
>>> Rails support in v3 is enabled by 3 small jars. This particular error is due to a bug in the RailsSniffer, where it
tries to detect if the app is a Rails app by looking for certain artifacts and reports to v3 deployer that it can not
>>> Prior to Rails 2.3.2, there would be a base class app/controller/application.rb. With version 2.3.2, this base class
is renamed to application_controller.rb. RailsSniffer tries to look for app/controller/application.rb and it does not
find it so it fails. Post prelude these auto-detection is made much robust.
>> Ah! I figured as much. It fit the design pattern that triggered problems for v3 Prelude and JRuby 1.2.0 earlier.
>> Do you think/know of other issues that may appear once we get past this RailsSniffer issue?
>> It sounds like we may be able to get past this without a patch... if the plugin 'nudges' the rails app with the
necessary data to fool the sniffer... This should be pretty easy to implement... since NB 6.7 is in-flight at the moment.
>> This assumes that there are no 'deeper issues' associated Rails 2.3.2 and GF v3 Prelude and JRuby 1.2.0...
> I think that would be pretty much it. I will not be able to do much work on this today (last day of my vacation):)
> I can try it out on monday and send an update.
I'll change the rails project wizard to use GF Gem by default and also make the gem downloadable directly from the
Fixed in 5559c9bac1bf (ruby-main). Of course, the issue with Prelude / 2.3.2 remains, but as discussed I solved this by
making GF Gem to be the default server instead of Prelude.
The gem is not bundled with the IDE but the wizard will install if needed. There are some further tweaks we can do
after beta, such as having a GF Gem option also in Project Properties even when not installed. There is also an issue
with the GF Gem plugin that causes the browser to be launched before the app is ready when running the app for the
first time, but that is a separate issue.
I'd like to transplant the fix to the beta clone too - Martin, can you please verify?
Integrated into 'main-golden', will be available in build *200904210201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Erno Mononen <firstname.lastname@example.org>
Log: #162970: Rails projects do not deploy to v3 Prelude
- made GF Gem the default choice
- made the wizard will offer gf gem even if it is not installed
This fix does not works well for jdk 1.5.0 because the GF Gem server reguires jdk 6, can you please offer WEBrick as
default server on jdk1.5.0 platform?
I added a check for JDK 6 in the wizard (when using GF Gem):
GF Gem is still the default server.
Verified by QE in: ruby-2614-on-090421 .
Peter: I assume this means we need to test/fix debug support and the like? Please double check this soon.
Note that this solution is mainly for 6.7 Beta, it is still unclear whether GF Gem will be the default server for FCS.
That is to say that IMO debugging support for GF Gem is not a stopper for Beta.
Just an FYI - I'm looking into status of gem, debugging, etc.
I transplanted the fixes to the beta clone:
Verified in Nb 6.7 Beta (Build 200904230001) by QE.