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.

Bug 139188 - Default page for Rails application in 6.5 M1
Summary: Default page for Rails application in 6.5 M1
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
: 139474 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-08 00:16 UTC by arungupta
Modified: 2008-08-04 15:42 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description arungupta 2008-07-08 00:16:56 UTC
Running a Rails app shows the default page as "http://localhost:8080" which is the default page for v3. It should
instead be "http://localhost:8080/<RAILS_APPLICATION_NAME>" which is the default Rails page.
Comment 1 _ pcw 2008-07-10 20:17:52 UTC
*** Issue 139474 has been marked as a duplicate of this issue. ***
Comment 2 Chris Kutler 2008-07-11 01:26:01 UTC
If anyone has a workaround to run the Depot sample app in the default GF server, please let me know. When I run the
Depot sample app, I get the GF default page, as described here. Then I try the following URLS, which should work, and I
always get HTTP Status 404
type Status report message description The requested resource () is not available Glassfish/v3. 


http://localhost:8080/store
http://localhost:8080/login
http://localhost:8080/info/who_bought/1

Also, going to the Services window and chosing Servers > GlassFish V3 > Applications > Depot Application > Open in
Browser opens the following URL in the browser, which also doesn't work: http://localhost:8080/Depot%20Application/
Comment 3 _ pcw 2008-07-11 02:11:51 UTC
Run the IDE with -J-Dglassfish.level=FINE and check your server log or IDE console window for what the deploy command is
when you deploy the application.  What was used for context root?

Alternatively, you can examine domain.xml for your server and see what is shown for the context-root attribute of the
application field for your deployed jruby application.
Comment 4 Chris Kutler 2008-07-11 04:05:15 UTC
Thank you for your help.

Running with -J-Dglassfish.level=FINE did not cause any additional information to be emitted from the GlassFish console:

INFO: Loading application Depot Application at /Depot Application

As I noted earlier, http://localhost:8080/Depot%20Application/ gives the requested resource () is not available message.

And, as expected, in the domain.xml the context root is /Depot Application 

I noticed that in the Properties window for the GF server in the JRuby tab is a check box labeled Deploy All Rails
Applications At Root Context. I selected that checkbox and redeployed the app. After doing that,
http://localhost:8080/store worked.

I get a different outcome when I use the URL http://localhost:8080/Depot%20Application/. This time I get the as-expected
error message "No route matches "/Depot%20Application/" with {:method=>:get}"

I will ping the dev@ruby.netbeans.org alias to find out information about that checkbox and see if anyone can explain
what the user should expect to see happen when they right-click on a Ruby/Rails application in the Services window and
choose Open in Browser. Is this supposed to work for Ruby/Rails projects? Do they have to do something extra to make it
work? or is there some bug?

Comment 5 _ pcw 2008-07-11 06:03:20 UTC
I meant the *NetBeans* console, not GlassFish Console.

You will only see this if you are running from a command prompt and running nb.exe.  I thought those messages also went
to the netbeans messages.log file though, so you can look there if you are not running with a console.

And of course, you can still check domain.xml and see what context root GlassFish used during deploy.

Is there a space in the name of the project?
Comment 6 Chris Kutler 2008-07-11 16:39:23 UTC
>I meant the *NetBeans* console, not GlassFish Console.
I meant the GlassFish Output tab in the Output window (I thought that when you said NetBeans IDE Console window, you
meant the NetBeans Output window that appears at the bottom of the IDE.) 

> And of course, you can still check domain.xml and see what context root GlassFish used during deploy.

Yes, I did that. As I wrote in my earlier message "in the domain.xml the context root is /Depot Application"

> Is there a space in the name of the project?

Yes, there is a space. This is the Depot Application sample application that comes with the IDE. I am suspicious that
this will cause problems but there are too many bugs for me to be able to test whether the space causes a problem.

Thanks for your help
Comment 7 _ pcw 2008-07-15 22:13:19 UTC
By console window I do _not_ mean any window in the IDE at all - I mean the JDK console window (or OS console window)
which is the command shell window from which you started it (or a special window on Mac's, may not exist if launched via
netbeans.exe on windows).  Nevermind, I suspect you are not running with it visible.

It looks like there is a "space in context root" bug in the <Run Application> method for the V3 server plugin.  For now,
just don't use spaces in your project names.  I'll fix this for M2.
Comment 8 Chris Kutler 2008-07-15 22:47:12 UTC
Hi Peter,

For the record. I am not using spaces. Who ever is packaging the Depot sample application with the product is using
spaces. I am adding as the fix to this bug fixes the now broken Depot sample application.
Comment 9 Chris Kutler 2008-07-15 22:49:15 UTC
I meant to say, "I am adding Erno to the CC list as the fix to this bug fixes the now broken Depot sample application."
Comment 10 _ pcw 2008-07-15 22:54:40 UTC
Is there a reason this must be fixed in before next week?  I don't see it as a blocking issue, but if for some reason it
is, you should tell me and tell me why.

There is a cost associated with fixing bugs before feature freeze, but if it's necessary, then we'll fix it earlier.
Comment 11 Chris Kutler 2008-07-15 23:08:15 UTC
In my opinion, it does not make sense to have the Depot sample application if it won't work out of the box. If we don't
fix this bug, should we pull the Depot sample application from 6.5? Or maybe change the project name of the sample
application to not use spaces, or change the server to WEBrick.

I am just the technical writer who happened to have tried to use the depot sample application. Who is the QE person for
the sample application? Should we add that person to the CC list?
Comment 12 _ pcw 2008-08-04 07:10:02 UTC
V3 is behaving inconsistently with regard to white space in the deployment command, accepting url encodings for some
values, but decoding other values and not recoding them on retrieval.

I fixed this by mapping all " " and tab characters encountered in application names to an underscore for the name and
context-root (if used) fields.

Fixed in build 3227

http://hg.netbeans.org/main/rev/b3ef6676d4b9

Comment 13 Quality Engineering 2008-08-04 15:42:55 UTC
Integrated into 'main-golden', available in build *200808041401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/b3ef6676d4b9
User: pcw@netbeans.org
Log: #139188 fixed whitespace in folder/project name for rails deployments to V3.