Grails Web アプリケーションを作成しています。アプリケーションをローカルにデプロイすると問題なく起動しますが、Heroku または CloudFoundry にデプロイしようとすると、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
このアプリは、ルートにある「plugins」というフォルダーにあるインライン プラグインを使用します。次に、プラグインを参照するためにBuildConfig.groovyに次のコードを記述します。
grails.plugin.location.'spring-security-ui'="plugins/grails-spring-security-ui"
grails.plugin.location.'kickstart-with-bootstrap'="plugins/ui"
インライン プラグインを使用してから、アプリをクラウドにデプロイする際にこの問題が発生し始めましたが、これまでこの問題が発生したことはありませんでした。プラグイン。
以下のコードがconfig.groovyファイルにあることを確認したことに注意してください。
grails.resources.adhoc.patterns = ['/images/*', '/css/*', '/js/*', '/plugins/*']