bootstrap-rails icon indicating copy to clipboard operation
bootstrap-rails copied to clipboard

Couldn't find Bootstrap on Heroku

Open thejourneydude opened this issue 11 years ago • 7 comments

Everything works fine on my localhost, however whenever I push to Heroku I come across this error when Heroku runs rake assets:precompile.

   rake aborted!
   couldn't find file 'bootstrap'
   (in /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/rails_admin-0.5.0/app/assets/javascripts/rails_admin/rails_admin.js:18)
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:106:in `resolve'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:146:in `require_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:217:in `process_require_directive'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:167:in `block in process_directives'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:165:in `each'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:165:in `process_directives'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/directive_processor.rb:99:in `evaluate'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:197:in `block in evaluate'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `each'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/context.rb:194:in `evaluate'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/processed_asset.rb:12:in `initialize'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `new'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:374:in `block in build_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:395:in `circular_call_protection'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:373:in `build_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `block in build_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/bundled_asset.rb:16:in `initialize'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:377:in `new'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:377:in `build_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:94:in `block in build_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/caching.rb:58:in `cache_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:93:in `build_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/base.rb:287:in `find_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/index.rb:61:in `find_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:257:in `benchmark'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:210:in `find_asset'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:119:in `block in compile'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `each'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/sprockets/manifest.rb:118:in `compile'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-2.10.0/lib/rake/sprocketstask.rb:146:in `with_logger'
   /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
   Tasks: TOP => assets:precompile
   (See full trace by running task with --trace)
!
!     Precompiling assets failed.
!

!     Push rejected, failed to compile Ruby/Rails app

My Gemfile looks like this

source 'https://rubygems.org'

ruby '2.0.0'

gem 'rails', '4.0.0'

gem 'pg'

gem 'sass-rails', '~> 4.0.0'

gem 'uglifier', '>= 1.3.0'

gem 'coffee-rails', '~> 4.0.0'

gem "slim-rails", "~> 2.0.1"

gem 'jquery-rails'

gem 'jbuilder', '~> 1.2'

group :doc do
  gem 'sdoc', require: false
end

gem "rails_12factor", "~> 0.0.2", group: :production

gem "sass-rails", "~> 4.0.0"

gem "anjlab-bootstrap-rails", "~> 3.0.0.2", require: 'bootstrap-rails'

gem "annotate", "~> 2.5.0"

gem 'bcrypt-ruby', '~> 3.0.0'

gem 'unicorn'

gem "cancan", "~> 1.6.10"

gem "rails_admin", "~> 0.5.0"

thejourneydude avatar Aug 23 '13 17:08 thejourneydude

I have it working on Heroku. The main difference I see in my GemFile is this:

gem 'anjlab-bootstrap-rails', '>= 3.0.0.0', require: 'bootstrap-rails'

Also, make sure you run bundle install

kjakm avatar Aug 27 '13 10:08 kjakm

I tried it with 3.0.0.0 but received the same error in the original post.

thejourneydude avatar Aug 27 '13 15:08 thejourneydude

Does replacing the ~ with > like in my example make any difference?

kjakm avatar Aug 27 '13 16:08 kjakm

Nope, still got the same error.

thejourneydude avatar Aug 27 '13 21:08 thejourneydude

I'm wondering if it has to do with Rails Admin because of this line of code below:

(in /tmp/build_2cr88btdoy00s/vendor/bundle/ruby/2.0.0/gems/rails_admin-0.5.0/app/assets/javascripts/rails_admin/rails_admin.js:18)

thejourneydude avatar Sep 09 '13 03:09 thejourneydude

I'm having issues with heroku + this gem as well. Getting:

2013-09-10T17:59:27.190730+00:00 app[web.1]: /app/vendor/bundle/ruby/2.0.0/gems/anjlab-bootstrap-rails-3.0.0.2/lib/bootstrap-rails/engine.rb:6:in `block in <class:Engine>': uninitialized constant Bootstrap::Rails::Engine::Sass (NameError)

in my heroku logs. get a generic h10 application error whenever I include the gem on deploy. App won't load.

radrice avatar Sep 10 '13 18:09 radrice

https://github.com/sferik/rails_admin/wiki/Troubleshoot

Drakula2k avatar Oct 30 '13 13:10 Drakula2k