Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails custom environment

Tags:

grails

when I try to make use of custom environments in grails by setting the environment name like

grails -Dgrails.env=demo run-app

I only get an error message saying

Script 'demo' not found, did you mean: ...

It seems that this problem only exists in a windows environment - on linux, everything works fine...

Sorry, I've forgotten to mention that I use Grails v 2.0.3

like image 556
rdmueller Avatar asked Apr 30 '12 12:04

rdmueller


1 Answers

found a solution:

windows needs the quotation marks around the parameter:

grails "-Dgrails.env=demo" run-app

this works for both OS: windows and linux!

Update:

It seems that only the windows powershell needs the quotation marks, but linux accepts them, too:

grails "-Dgrails.env=demo" run-app

For windows cmd.exe, you have to use the statement without the quotation marks:

grails -Dgrails.env=demo run-app

horrible.

like image 70
rdmueller Avatar answered Oct 11 '22 22:10

rdmueller