Closed softwaregravy closed 11 years ago
Interesting, but looks more like a sprockets bug, this is what we do to compile the assets: https://github.com/jruby/heroku-buildpack-jruby/blob/master/bin/compile#L174
btw, are you using the the default heroku buildpack or this buildpack? this line made me wonder: https://github.com/softwaregravy/aws_info/blob/master/Gemfile#L3
I assumed I was. I followed: https://devcenter.heroku.com/articles/moving-an-existing-rails-app-to-run-on-jruby#specify-jruby-in-your-gemfile which is where that line in my Gemfile came from
ok, then you're not, you can report the bug to https://github.com/heroku/heroku-buildpack-ruby and/or try the same app but with this buildpack:
$ heroku config:set BUILDPACK_URL=https://github.com/jruby/heroku-buildpack-jruby
you can switch back at any time with:
$ heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby
Thanks for the help
FYI. This doesn't look like a problem specific to this project, but I can't use this buildback because:
Using rails (3.2.13)
Using sass (3.2.8)
Using sass-rails (3.2.6)
Using therubyrhino_jar (1.7.4)
Using therubyrhino (2.0.2)
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Removing bundler (1.3.2)
Dependencies installed
cp: cannot create regular file `/app/tmp/repo.git/.cache/vendor/bundle/jruby/1.9/bundler/gems/jquery-datatables-rails-494f752b8eb8/.git/objects/pack/pack-2d53341831c1ba883a63c4d5e0e627a017ecc616.idx': Permission denied
cp: cannot create regular file `/app/tmp/repo.git/.cache/vendor/bundle/jruby/1.9/bundler/gems/jquery-datatables-rails-494f752b8eb8/.git/objects/pack/pack-2d53341831c1ba883a63c4d5e0e627a017ecc616.pack': Permission denied
cp: cannot create regular file `/app/tmp/repo.git/.cache/vendor/bundle/jruby/1.9/cache/bundler/git/jquery-datatables-rails-b8d699e208e47fe51869a7aebe3d593ff0672f4a/objects/pack/pack-2d53341831c1ba883a63c4d5e0e627a017ecc616.idx': Permission denied
cp: cannot create regular file `/app/tmp/repo.git/.cache/vendor/bundle/jruby/1.9/cache/bundler/git/jquery-datatables-rails-b8d699e208e47fe51869a7aebe3d593ff0672f4a/objects/pack/pack-2d53341831c1ba883a63c4d5e0e627a017ecc616.pack': Permission denied
! Heroku push rejected, failed to compile Jruby app
To git@heroku.com:aws-data.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:aws-data.git'
yeah, git repos in the gem file isn't working..
On Monday 29 April 2013 at 11:54, John Hinnegan wrote:
FYI. This doesn't look like a problem specific to this project, but I can't use this buildback because: Using rails (3.2.13) Using sass (3.2.8) Using sass-rails (3.2.6) Using therubyrhino_jar (1.7.4) Using therubyrhino (2.0.2) Your bundle is complete! Gems in the groups development and test were not installed. It was installed into ./vendor/bundle Removing bundler (1.3.2) Dependencies installed cp: cannot create regular file
/app/tmp/repo.git/.cache/vendor/bundle/jruby/1.9/bundler/gems/jquery-datatables-rails-494f752b8eb8/.git/objects/pack/pack-2d53341831c1ba883a63c4d5e0e627a017ecc616.idx': Permission denied cp: cannot create regular file
/app/tmp/repo.git/.cache/vendor/bundle/jruby/1.9/bundler/gems/jquery-datatables-rails-494f752b8eb8/.git/objects/pack/pack-2d53341831c1ba883a63c4d5e0e627a017ecc616.pack': Permission denied cp: cannot create regular file/app/tmp/repo.git/.cache/vendor/bundle/jruby/1.9/cache/bundler/git/jquery-datatables-rails-b8d699e208e47fe51869a7aebe3d593ff0672f4a/objects/pack/pack-2d53341831c1ba883a63c4d5e0e627a017ecc616.idx': Permission denied cp: cannot create regular file
/app/tmp/repo.git/.cache/vendor/bundle/jruby/1.9/cache/bundler/git/jquery-datatables-rails-b8d699e208e47fe51869a7aebe3d593ff0672f4a/objects/pack/pack-2d53341831c1ba883a63c4d5e0e627a017ecc616.pack': Permission denied ! Heroku push rejected, failed to compile Jruby app To git@heroku.com (mailto:git@heroku.com):aws-data.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'git@heroku.com (mailto:git@heroku.com):aws-data.git'— Reply to this email directly or view it on GitHub (https://github.com/jruby/heroku-buildpack-jruby/issues/10#issuecomment-17149220).
This looks like its an issues with the closure_compiler - https://github.com/documentcloud/closure-compiler/pull/23#issuecomment-16880546
however removing:
config.assets.js_compressor = :closure
as recommended did not help and then caused issues with bootstrap:
2013-09-04T22:14:17.754482+00:00 app[web.1]: Rendered home/index.html.erb within layouts/application (9224.0ms)
2013-09-04T22:14:18.350698+00:00 app[web.1]: WARN: tilt autoloading 'sass' in a non thread-safe way; explicit require 'sass' suggested.
2013-09-04T22:14:23.255099+00:00 app[web.1]: Completed 500 Internal Server Error in 14773ms
2013-09-04T22:14:23.271920+00:00 app[web.1]:
2013-09-04T22:14:23.271920+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: bootstrap.
2013-09-04T22:14:23.271920+00:00 app[web.1]: Load path: /app
2013-09-04T22:14:23.271920+00:00 app[web.1]: (in /app/app/assets/stylesheets/bootstrap_and_overrides.css.scss)):
2013-09-04T22:14:23.271920+00:00 app[web.1]: 4: <meta name="viewport" content="width=device-width, initial-scale=1.0">
2013-09-04T22:14:23.271920+00:00 app[web.1]: 5: <title><%= content_for?(:title) ? yield(:title) : "XXXXXX" %></title>
2013-09-04T22:14:23.271920+00:00 app[web.1]: 6: <meta name="description" content="<%= content_for?(:description) ? yield(:description) : "XXXXX" %>">
2013-09-04T22:14:23.271920+00:00 app[web.1]: 7: <%= stylesheet_link_tag "application", :media => "all" %>
2013-09-04T22:14:23.277557+00:00 heroku[router]: at=info method=GET path=/ host=xxxx.herokuapp.com fwd="50.174.65.141" dyno=web.1 connect=2ms service=14914ms status=500 bytes=643
2013-09-04T22:14:23.271920+00:00 app[web.1]: 8: <%= javascript_include_tag "application" %>
2013-09-04T22:14:23.271920+00:00 app[web.1]: 9: <%= csrf_meta_tags %>
2013-09-04T22:14:23.272159+00:00 app[web.1]: 10: <%= yield(:head) %>
2013-09-04T22:14:23.272159+00:00 app[web.1]: app/assets/stylesheets/bootstrap_and_overrides.css.scss:1
2013-09-04T22:14:23.272159+00:00 app[web.1]: app/views/layouts/application.html.erb:7:in `_app_views_layouts_application_html_erb___1028718369_30290'
2013-09-04T22:14:23.272159+00:00 app[web.1]:
It also seem that he build pack does not always compile the assets on a push...why would that be ? Manually compiling does not solve the problem,so not directly a problem.
Notice the first line? This was compiled on heroku.
I then precompiled the assets and pushed which fixed it. I should be able to just push and have it precompile on the heroku side though, no?
Thoughts? app is here https://github.com/softwaregravy/aws_info