custom ennvironments just wont work for me ?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

custom ennvironments just wont work for me ?

366388
Hi,

im using grails 2.3.0

I just cant seem to get a custom config to work for me, I added the following to Config.groovy:

 development{
   .. ... ..
 }
 custom {

 }

and also in DataSource.groovy


environments {
    development { //local
        dataSource {
..
    }
    custom{
 ...

}



then i start app from command line with grails -Dgrails.env=custom run-app
and also tried grails -D.env=custom run-app


when i run from console it says:
Killed: 9
| Server running. Browse to http://localhost:8080/cms

bu there is nothing there

ive checked and I have no other things running at this port



Ive also had this issue with older versions of grails and never got it working either and assumed one just had to stick with development/test/production


really confused
Reply | Threaded
Open this post in threaded view
|

Re: custom ennvironments just wont work for me ?

Domingo Suárez Torres
Hi,

To select a specific environment you must use:

-Dgrails.env=yourEnvId

Cheers

On Thursday, December 26, 2013, 366388 wrote:
Hi,

im using grails 2.3.0

I just cant seem to get a custom config to work for me, I added the
following to Config.groovy:

 development{
   .. ... ..
 }
 custom {

 }

and also in DataSource.groovy


environments {
    development { //local
        dataSource {
..
    }
    custom{
 ...

}



then i start app from command line with grails -Dgrails.env=custom run-app
and also tried grails -D.env=custom run-app


when i run from console it says:
Killed: 9
| Server running. Browse to http://localhost:8080/cms

bu there is nothing there

ive checked and I have no other things running at this port



Ive also had this issue with older versions of grails and never got it
working either and assumed one just had to stick with
development/test/production


really confused



--
View this message in context: http://grails.1312388.n4.nabble.com/custom-ennvironments-just-wont-work-for-me-tp4652810.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: custom ennvironments just wont work for me ?

366388
I already said that I had tried this
Reply | Threaded
Open this post in threaded view
|

Re: custom ennvironments just wont work for me ?

SAgrawal14
How could you confirm that its not running on your custom environment, is there any environment specific configuration in your custom environment.
Also double check the environment name while grails starts: Environment set to <development>.

Shashank


On Thu, Dec 26, 2013 at 9:39 PM, 366388 <[hidden email]> wrote:
I already said that I had tried this



--
View this message in context: http://grails.1312388.n4.nabble.com/custom-ennvironments-just-wont-work-for-me-tp4652810p4652812.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Thank You,

SA
Reply | Threaded
Open this post in threaded view
|

Re: custom ennvironments just wont work for me ?

366388

yes I checked that it does say Environment set to <development>. as its building and launching, but when fo to address it points to I get 404



really cant see what the issue is, I added the necessary block to Config.groovy and Datasource.groovy but no luck. Not unless its something to do with my jdk or something, but unlikely

java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
Reply | Threaded
Open this post in threaded view
|

Re: custom ennvironments just wont work for me ?

micke_
I've done what you've mentioned and for me it works just fine. I created custom uat, devmysql and demo environments in an app I'm working on and it works like a charm.

When you say 
"
yes I checked that it does say Environment set to <development>
"
You mean it said "Environment set to custom" right?

Only remember updating environments {} blocks in Config.groovy and DataSource.groovy . Not 100% clear from your first email if you added your custom environment under the environments block or not.

Next thing I would try is to try a different name for my custom env, like demo or uat just in case 'custom' has special meaning or something. Long shot I know.

After that  I'd try creating a brand new app and adding a custom environment to that and check if that works.

Good luck,
 micke




On 29 December 2013 13:43, 366388 <[hidden email]> wrote:

yes I checked that it does say Environment set to <development>. as its
building and launching, but when fo to address it points to I get 404



really cant see what the issue is, I added the necessary block to
Config.groovy and Datasource.groovy but no luck. Not unless its something to
do with my jdk or something, but unlikely

java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)



--
View this message in context: http://grails.1312388.n4.nabble.com/custom-ennvironments-just-wont-work-for-me-tp4652810p4652875.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: custom ennvironments just wont work for me ?

SAgrawal14
Yeah, I'm sorry. I wanted to say to check for Environment set to custom.

Yes, you've to add your custom environment under environments block. That how this will work only. And its good to keep environment name other than 'custom', as it may mean something else.

Thank You,

Shashank


On Sun, Dec 29, 2013 at 11:00 PM, Mikael Andersson <[hidden email]> wrote:
I've done what you've mentioned and for me it works just fine. I created custom uat, devmysql and demo environments in an app I'm working on and it works like a charm.

When you say 
"
yes I checked that it does say Environment set to <development>
"
You mean it said "Environment set to custom" right?

Only remember updating environments {} blocks in Config.groovy and DataSource.groovy . Not 100% clear from your first email if you added your custom environment under the environments block or not.

Next thing I would try is to try a different name for my custom env, like demo or uat just in case 'custom' has special meaning or something. Long shot I know.

After that  I'd try creating a brand new app and adding a custom environment to that and check if that works.

Good luck,
 micke




On 29 December 2013 13:43, 366388 <[hidden email]> wrote:

yes I checked that it does say Environment set to <development>. as its
building and launching, but when fo to address it points to I get 404



really cant see what the issue is, I added the necessary block to
Config.groovy and Datasource.groovy but no luck. Not unless its something to
do with my jdk or something, but unlikely

java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)



--
View this message in context: http://grails.1312388.n4.nabble.com/custom-ennvironments-just-wont-work-for-me-tp4652810p4652875.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Thank You,

SA