I am trying to upgrade Grails 2.4 to 3.3.6 and fail to change environments: from Development to test. Can someone help me? - upgrade

if (Environment.current == Environment.TEST)
I am trying to upgrade Grails 2.4 to 3.3.6 and not able to change environments: from Development to test, Can someone help me?

You can pass the environment when your start the application.
grails -Dgrails.env=TEST run-app
Check this

I was doing only copy and paste my controllers and services so there is no run configuration was created by default. I just go to IntelliJ--Run--Edit configuration and added the information as per the screenshot.enter image description here

Related

Rundeck upgrade from 3.3.5 to 3.4.10

Can someone share the procedure to upgrade rundeck 3.3.5 to 3.4.10
In order to over come log4j security vulnerability
The process is described here. Your instance is 3.3.5 so, you don't need to follow the database migration process, you can test in a non-prod env by launching the new instance over the old one.
Anyway, as good advice please backup all your instance data and test it in a non-prod environment before.
UPDATE 04/22/2022:
Rundeck 4.1.0 uses H2v2 as the default testing backend, please take a look at this if you're using H2 as the default backend.

How enable production mode in GWT 2.7 application

I would like to deploy my GWT 2.7 application on my server through gwt-maven-plugin and jenkins. But, after compile process, when I launch my application, I've this error message :
Couldn't load APPLICATION_NAME from Super Dev Mode
server at http://MY_IP:9876.
Please make sure this server is ready.
Indeed, the super dev mode is enabled by default since 2.7. So, how disable it to use production mode ?
Ok thank you very much for your comment. Indeed, my problem concerned the *.nocache.js and *.devmode.js files. I started my project (my first one in GWT) in 2.6 version and these files were created (by dev and super-dev-mode) and versionned by my fault. So, when my jenkins deployed my project, it used these files so even if I did mvn clean before deploy it had no effect.
So, I removed these files from my project and I did a mvn clean install before deploy to fix my issue.

The latest application is not deployed in wso2cloud

It seems to me like the latest code that I submitted to WSO2 App cloud is not deployed. I tried to access the jenkins server (https://jenkins.cloud.wso2.com/t/cleancoders/webapps/jenkins/job/draft-trunk-default/) I see there that the latest code is built(upto build 29) but on the App cloud still build 24 is deployed. It seems to like the jenkins builds are not synced and deployed.
I also tried to build and deploy manually but It seems that it is not having an effect.
Please suggest what should be done in order to deploy the latest build.
Thanks in advance.
This is a kind of problem which you can get when your app is not properly deployed in jenkins. (There may be configuration issues). Please do contact cloud#wso2.com for assistance.

Cannot deploy my updates to cloudfoundry

I have a simple app running on tomcat (using Postgresql). I deployed it to the Cloud-Foundry using the STS plugin and it runs OK. Recently I've encountered serious compilation problems (related to JS and JQuery) which led me to re install my STS. Now, when I run the app locally it runs perfect but when I use "Update & Restart" nothing happens - my new updates are not deployed! (I'm connected and Start/Stop works). I don't have a clue for how to tackle this. Please help.
Since you have reinstalled your STS, I would suggest you delete your app from Cloud Foundry and deploy your project from STS again. It might be because your project is not being linked with the app you have on cloudfoundry.com
Try that and let us know how it goes.

Moving app to production mode in Symfony 2

Can someone help me to move my Symfony 2 application into production mode?
Currently, the application is running properly in /app_dev.php.
I'm googling, but I'm not finding a definite guide for deployment in Symfony 2.
Couple more things to consider:
php app/console cache:clear --env=prod --no-debug
php app/console assets:install web_directory
php app/console assetic:dump web_directory
You might also run into permission issues with the cache directory. I would actually first make sure everything works in development mode on the server before switching to production mode. And if all you get is blank screens in production mode then set debug to true. And of course know how to check your error logs.
Moving Symfony2 to production means :
access the application through : app.php/
Test dev bundles won't be loaded since there is a condition into the AppKernel.php when you use app.php. If you want to unload bundle that should be used only in dev, you can place them into the this section (in appKernel.php)
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new Sf2gen\Bundle\GeneratorBundle\Sf2genGeneratorBundle();
}
You also need to make some server tuning by désactivating xdebug and adding eacclerator (or someting else for caching performance)
I also advice to rename app_dev.php to disactivate dev mode
Basic configuration information can be found here:
http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html
One important spot where many people stumble is asset management. When accessing the app via the app.dev front controller (see fist link), it may be necessary to dump the assets first. Read all about it here:
http://symfony.com/doc/current/cookbook/assetic/asset_management.html#cookbook-assetic-dumping
The Symfony CookBook has now a few recipes about deployment covering:
standard linux-based web-server: How to Deploy a Symfony2 Application,
Microsoft Azure Website Cloud: Deploying to Microsoft Azure Website Cloud,
Heroku Cloud: Deploying to Heroku Cloud.
Symfony2
How to Master and Create new Environments
http://symfony.com/doc/current/cookbook/configuration/environments.html