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.
I did not find a way to run multiple projects from IDE. The first project asks for an available port and starts webrick, if I create a second project it will not do anything with webrick. I can see the pages of the first project but not the pages of the second one, obviously. Do we need UI for multiple instances in Runtime tab, start a new instance for every project with a new port, etc?
I'm looking at this.
Created attachment 39346 [details] proposed fix
summary of changes in the proposed fix: - WEBrick is not a singleton, an instance is stored in every rails project - port conflict detection is based on pinging the port with an HTTP GET request - copied from tomcat support (I still keep the detection of error in output as a fall back, but it should not be used AFAICT) - if there is a conflict it does not ask for port number, just attempts to use port + 1 until it finds a free port (on the assumption that there will be port conflict more often then not in a multi project scenario) - name on output tab is WEBrick for {project name} on {3001} - only relative URL is being passed to showUrl (server knows its url) - I only tested with JRuby remaining issues (not solved by the patch) - keep track of ports used by open project - start from 3000, remove the dialog that asks for the port to use(?) - separate node for each WEBrick in Runtime tab
BTW, I found that there may still occasionally be a problem with the code that detects availability of port. There is a timeout - cusrrently set to 3000ms - and if the system is busy it will not detect the server running on the port and will attempt to start WEBrick. This happened to me when creating a new project right after startup. We may want to keep the code that parses the output as a back for this case.
fixed by tor (tx)
Reassigning this issue to newly created 'ruby' component.
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.