NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Deployment contexts with GF v3 Prelude

 
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users
View previous topic :: View next topic  
Author Message
mac205



Joined: 17 Feb 2013
Posts: 14

PostPosted: Sun Mar 10, 2013 2:30 pm    Post subject: Deployment contexts with GF v3 Prelude Reply with quote

I'm not sure which of these questions are more appropriately directed
at a GlassFish list, so I apologize if I'm asking in the wrong forum.
Since NetBeans and GlassFish are so tightly integrated, I'm not sure
which of them is causing my confusion.

I'm developing a Rails application using Rails 2.2RC1 and JRuby 1.1.5
with NetBeans 6.5RC2 and GlassFish v3 Prelude (yep, I'm way out there
on the edge - but for the record the same problems I'm seeing happen
with Rails 2.1.0 as well). I'm having a bit of trouble understanding
deployment contexts. There is a setting at Tools -> Servers ->
GlassFish v3 Prelude -> JRuby labeled "Deploy All Rails Applications
At Root Context (/)", which is a checkbox. For brevity I'll call this
the "root context setting".

I begin with that setting on and my application loaded and running at
"/". The first thing I notice is that when I start the server,
NetBeans sends my browser to http://localhost:8080// (note the extra
slash). The second slash is harmless, but clearly shouldn't be there.

The next thing I notice is that I can't get to the admin console. If I
go to http://localhost:4848/ I get my deployed Rails application.

If I stop the server, turn the root context setting off, and start the
server, it deploys the app at the root context anyways (INFO: Loading
Rails application twittertracks at /). Often stopping and starting the
server again (by stopping the running GF server and right-clicking on
my app in NetBeans and choosing "Run"), it gets it right on the second
try (INFO: Loading Rails application twittertracks at /twittertracks).
Sometimes it takes several starts and stops to get it to do this,
though.

Once the application is running in its own context, I can access the
admin console again at http://localhost:4848. But now my application's
routes seem not to work correctly. If I try to access my one
scaffolded controller (this is a brand new blank Rails-generated app
with only one scaffolded controller and model for testing), I get a
routing error: No route matches "/twittertracks/fakes" with
{:method=>:get}.

If I turn the root context setting back on and stop and start the
server - at least twice - it deploys my application at the root
context again, and I'm back where I started. My application works, but
I cannot access the GlassFish console.

Sorry for the long-winded explanation. Just trying to paint as
complete a picture as I can. Can someone shed a little light on what
I'm seeing?
Back to top
janechangnum



Joined: 10 Mar 2015
Posts: 2
Location: sfdsadfg

PostPosted: Tue Mar 10, 2015 11:53 am    Post subject: Reply with quote

Reported post
It is a very good post on it. I just posted this and I was looking for rerunning. There is for sure a lot of content I like.
Back to top
moblie120



Joined: 20 Aug 2015
Posts: 5
Location: shanghai

PostPosted: Tue Aug 25, 2015 7:04 am    Post subject: Reply with quote

Reported post
The second slash is harmless, but clearly shouldn't be there.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Ruby Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo