【发布时间】:2014-01-20 16:15:56
【问题描述】:
我已经把我的代码放在github 但是当我推送到heroku
错误:-
rake aborted!
couldn't find file 'twitter/bootstrap'
(in /tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/app/assets/javascript
s/application.js:15)
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/context.rb:106:in `resolve'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/context.rb:146:in `require_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/directive_processor.rb:217:in`process_requi
re_directive'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/directive_processor.rb:167:in `block in process_directives'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/directive_processor.rb:165:in `each'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/directive_processor.rb:165:in `process_directives'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/directive_processor.rb:99:in `evaluate'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/context.rb:197:in `block in evaluate'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/context.rb:194:in `each'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/context.rb:194:in `evaluate'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/processed_asset.rb:12:in `initialize'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/base.rb:374:in `new'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/base.rb:374:in `block in build_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/base.rb:395:in `circular_call_protection'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/base.rb:373:in `build_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/bundled_asset.rb:16:in `initialize'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/base.rb:377:in `new'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/base.rb:377:in `build_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/manifest.rb:211:in `block in find_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/manifest.rb:257:in `benchmark'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/manifest.rb:210:in `find_asset'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/manifest.rb:119:in `block in compile'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/manifest.rb:118:in `each'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/sprockets/manifest.rb:118:in `compile'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) i
n define'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-2.10.1/lib/rake/sprocketstask.rb:146:in `with_logger'
/tmp/build_84917108-19fa-4e88-8644-70f8ceccdb4f/vendor/bundle/ruby/2.0.0/
gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) i
n define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
To git@heroku.com:sheltered-ravine-2545.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:sheltered-ravine-2545.git'`
当我添加gem twitter-bootstrap-rails 时,它显示不同的错误,因为我正在处理windows,其中sass 无法加载。
我的 gem 文件
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'pg'
gem 'sass-rails', '~> 4.0.0'
gem 'protected_attributes'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem "devise", "~> 3.2.2"
gem "highcharts-rails", "~> 3.0.7"
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
group :doc do
gem 'sdoc', require: false
end
在我的 applicaition.js
中 // This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require turbolinks
//= require_tree .
【问题讨论】:
-
你能发布你的 application.js 文件吗?
-
我已经添加了
application.js。我的代码在 git 上。 -
我想我应该删除
//=twitter/bootstrap.?
标签: ruby-on-rails ruby git twitter-bootstrap heroku