Ruby on rails Manifest.yml空
每当我运行Ruby on rails Manifest.yml空,ruby-on-rails,ruby-on-rails-3,heroku,asset-pipeline,Ruby On Rails,Ruby On Rails 3,Heroku,Asset Pipeline,每当我运行rakeassets:precompile,我都会得到一个manifest.yml文件,它看起来像: --- {} 一定是出了什么事。以下是我对rake资产的输出:预编译--trace: ** Invoke assets:precompile (first_time) ** Execute assets:precompile /Users/user/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /Users/user/.rvm/gems/ruby-1.9.
rakeassets:precompile
,我都会得到一个manifest.yml
文件,它看起来像:
--- {}
一定是出了什么事。以下是我对rake资产的输出:预编译--trace
:
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/user/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /Users/user/.rvm/gems/ruby-1.9.3-p194@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
** Invoke assets:precompile:nondigest (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:nondigest
有人能帮忙吗??谢谢
更新:
当我运行
rake assets:precompile
为您的应用程序运行时,请随意查看我的代码
➜ novulty git:(master) ✗ rake assets:precompile
/Users/deefour/.rbenv/versions/1.9.3-p125/bin/ruby /Users/deefour/.rbenv/versions/1.9.3-p125/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Undefined variable: "$baseLineHeight".
(in /Users/deefour/.rbenv/versions/1.9.3-p125/gemsets/novulty/gems/bootstrap-sass-2.1.0.1/vendor/assets/stylesheets/bootstrap/_accordion.scss)
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/Users/deefour/.rbenv/versions/1.9.3-p125/...]
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
rake assets:precompile 12.50s user 1.21s system 99% cpu 13.744 total
我不知道你的意图是什么,但你有
包含在app/asssets/bootstrap.min.css
app/assets/application.css
在您的gem'bootstrap-sass'
中,这似乎会导致Gemfile
(以及其他文件)被添加到您的管道中,即使它们没有包含在bootstrap-sass-2.1.0.1/vendor/assets/stylesheets/bootstrap/_accordion.scss
app/assets/application.css的require行中
$baseLineHeight
SASS变量没有为该gem文件的资产中的某一行定义,否则您会忽略该资产(据我所知)
然后我做了下面的事情
gem文件中的bootstrap sass
gem
#gem 'bootstrap-sass'
bundle
rake资产:清理
app/assets/application.js
中删除了以下require行,因为它们来自bootstrap sass
gem,我在1中删除了这些行。
//= require bootstrap-transition
//= require bootstrap-button
//= require bootstrap-carousel
//= require bootstrap-collapse
//= require bootstrap-tab
rake资产:预编译
#gem 'bootstrap-sass'
这将导致出现以下public/assets/manifest.yml
- 根据需要使用
gem。在你的bootstrap sass
app/assets/application.css中包含SASS文件(这样做有点超出了这个问题的范围)
- 摆脱我上面提到的
gem,并将必要的Javascript文件作为资产包含在bootstrap sass
目录中(这也是vendor/assets/javascripts
所属的地方-app/assets/stylesheets/bootstrap.min.css
)vendor/assets/stylesheets
应用程序/资产
、库/资产
和供应商/资产
内容的任何信息,以及您的应用程序的应用程序::application.config.assets.precompile
值的信息都很有用。很抱歉,响应太晚了。我添加了我的github回购。希望有帮助!谢谢你的帮助。很抱歉这么晚才回复。但你是对的!