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 made this a P2 instead of a P3 because I don't know of any work arounds. If I change the Rails Environment setting from development (the default) to test or production, stop the WEBrick server, and run the application, the server runs in the mode that I set it to. When running with the GF V3 server, it always runs in development mode. I have stopped the server but that doesn't make a difference. How do I get GF V3 to honor my Rails Environment settings?
The project setting for (development, test, production) is not passed to GlassFish on launching. There are two workarounds: 1) Set RAILS_ENV to what you want before launching NetBeans (this means that to change it, you have to restart NetBeans and restart the server - not very nice) 2) Set the desired value in config/environment.rb and either restart the server or undeploy/rerun the application to for reinitialization of the Rails instance. Since GlassFish V3 in server from (ie not the gem) runs multiple Rails applications in the same JVM. If it is desired that these applications have their own distint "RAILS_ENV" value (and I assume it is), then option #1 is out, as it is global for the server. I talked with Vivek P. about possibly having a deployment property define this on a per application basis. Hopefully we can get something like that for GlassFish V3 Final. I looked into fixing this, where "fix" means set RAILS_ENV for the server process (if not yet set) to the value for the current Rails project and while this is feasible, it's rather convoluted and involves changing friend api between ruby.railsproject and glassfish.jruby. Not something I want to do this close to release of 6.5. We'll fix this for 7.0. So again, my recommended workaround is "Set the RAILS_ENV mode you want in config/environment.rb and be sure to either restart the server or manually undeploy and rerun the application to get it to take effect." We'll handle this better for 7.0.
This is too late to fix the 6.5 online help. I will make a note in the setting-up.html and add a FAQ. By the way, I will write that you should restart the server. Undeploying an app from the Services window on Mac or Windows is a good way to hose the app on GlassFish so that you can't get it to run again. I still haven't figured out how to get the server to run an app once you have undeployed it from the Services window, other than by reinstalling the server. I am sure there is a way, but I don't know what it is. Let me know and I will write a FAQ for that too.
Changing the component to serverplugins/glassfish_v3.
Not a P2 (see workaround in second comment and P2 justification in original description). Downgrading to P3.
Assigned engineer: please correct the tm value. nb 6.7 has shipped, so a tm of 6.7 is invalid at this point
pickup half of pcw's issues
reset the tm to be realistic... I have no idea when this will get fixed.
emononen: is there an api that will communicate the project's environment info when the user hits Run to the plugin?
according to Vivek: there is a deployment property that can be set to indicate what env user wants. So lets say, a user wants to deploy their application using 'production' environment using asadmin CLI as follows: asadmin deploy --property jruby.rackEnv=production railsApplicationDir/
Wrt. the API: there is no such API at the moment. Rails environment is a project property, but I don't think the plugin knows what project it is running. We should change the server spi in ruby.railsproject so that the env gets passed to the plugin.
OK. so I will assign this issue to railsproject for the API change... Once the API is available, you can assign the issue back to the plugin.
Lowering the priority as per the current GF team priorities.