Reputation: 1017
I am creating a Grails Web App and everything works fine when I deploy the application locally and it starts up without issues, however when I try to deploy to Heroku or CloudFoundry I get the following error from the logs in CF:
2012-10-15 12:14:15,865 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/css/bootstrap-responsive.css
2012-10-15 12:14:15,866 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/css/docs.css
2012-10-15 12:14:15,867 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/css/kickstart.css
2012-10-15 12:14:15,867 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /datepicker/css/datepicker.css
2012-10-15 12:14:15,868 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/js/bootstrap.js
2012-10-15 12:14:15,868 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /datepicker/js/bootstrap-datepicker.js
2012-10-15 12:14:15,869 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/js/kickstart.js
2012-10-15 12:14:17,506 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/css/bootstrap.css
2012-10-15 12:14:17,506 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/css/bootstrap-responsive.css
2012-10-15 12:14:17,507 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/css/docs.css
2012-10-15 12:14:17,507 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/css/kickstart.css
2012-10-15 12:14:17,508 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /datepicker/css/datepicker.css
2012-10-15 12:14:17,508 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/js/bootstrap.js
2012-10-15 12:14:17,509 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /datepicker/js/bootstrap-datepicker.js
2012-10-15 12:14:17,509 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/js/kickstart.js
2012-10-15 12:14:19,042 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/css/bootstrap.css
2012-10-15 12:14:19,043 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/css/bootstrap-responsive.css
2012-10-15 12:14:19,043 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/css/docs.css
2012-10-15 12:14:19,044 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/css/kickstart.css
2012-10-15 12:14:19,044 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /datepicker/css/datepicker.css
2012-10-15 12:14:19,045 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/js/bootstrap.js
2012-10-15 12:14:19,045 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /datepicker/js/bootstrap-datepicker.js
2012-10-15 12:14:19,045 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/js/kickstart.js
2012-10-15 12:14:20,248 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/css/bootstrap.css
2012-10-15 12:14:20,249 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/css/bootstrap-responsive.css
2012-10-15 12:14:20,249 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/css/docs.css
2012-10-15 12:14:20,250 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /kickstart/css/kickstart.css
2012-10-15 12:14:20,250 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /datepicker/css/datepicker.css
2012-10-15 12:14:20,251 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /bootstrap/js/bootstrap.js
2012-10-15 12:14:20,251 [http-28586-1] ERROR resource.ResourceMeta - Resource not found: /datepicker/js/bootstrap-datepicker.js
2012-10-15 12:14:20,252 [http-28586-1] ERROR resource.ResourceMeta - Resource not
This app uses in-line plugins located in a folder caled "plugins" at the root. I then have this code in the BuildConfig.groovy to reference the plugins:
grails.plugin.location.'spring-security-ui'="plugins/grails-spring-security-ui"
grails.plugin.location.'kickstart-with-bootstrap'="plugins/ui"
I only started getting this issue deploying the apps to the cloud once I used in-line plugins and never had this issue before:-S Can anyone please help me with this as its very annoying and I believe its being caused by the "resources" plugin.
Just to note I have made sure that the code below is in the config.groovy file:
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']
Upvotes: 0
Views: 2162
Reputation: 1017
I fixed this by moving the resource into the right location as they were located somewhere different :S
Thanks for the help!
Upvotes: 1
Reputation: 3984
Have you tried using a similar approach to the solution explained here;
Heroku, Grails: Missing resources if using multiple web dynos
Regardless of the focus on multiple dynos it looks like it may be a similar issue.
Upvotes: 0