1
我試圖按照建議上Why does dropdown-toggle (bootstrap) not work on heroku?引導不工作在Heroku
Heroku的運行耙資產:預編譯
它仍然沒有工作,現在我不能把我的應用程序。這裏的生成日誌:
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
###### WARNING:
Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
In rare occasions Bundler may not be able to resolve your dependencies at all.
https://devcenter.heroku.com/articles/bundler-windows-gemfile
-----> Installing dependencies using 1.6.3
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4
Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Using rake 10.4.0
Using json 1.8.1
Using minitest 5.4.3
Using builder 3.2.2
Using i18n 0.6.11
Using erubis 2.7.0
Using thread_safe 0.3.4
Using rack 1.5.2
Using mime-types 1.25.1
Using polyglot 0.3.5
Using arel 5.0.1.20140414130214
Using bundler 1.6.3
Using coffee-script-source 1.8.0
Using execjs 2.2.2
Using thor 0.19.1
Using hike 1.2.3
Using multi_json 1.10.1
Using pg 0.17.1
Using tilt 1.4.1
Using rails_serve_static_assets 0.0.2
Using rails_stdout_logging 0.0.3
Using sass 3.2.19
Using rdoc 4.1.2
Using tzinfo 1.2.2
Using treetop 1.4.15
Using rack-test 0.6.2
Using coffee-script 2.3.0
Using sprockets 2.12.3
Using uglifier 2.5.3
Using rails_12factor 0.0.3
Using sdoc 0.4.1
Using activesupport 4.1.4
Using tzinfo-data 1.2014.10
Using mail 2.5.4
Using actionview 4.1.4
Using activemodel 4.1.4
Using jbuilder 2.2.5
Using activerecord 4.1.4
Using actionpack 4.1.4
Using actionmailer 4.1.4
Using railties 4.1.4
Using coffee-rails 4.0.1
Using jquery-rails 3.1.2
Installing sprockets-rails 2.2.2
Using rails 4.1.4
Using sass-rails 4.0.5
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Bundle completed (10.20s)
Cleaning up the bundler cache.
Removing sprockets-rails (2.2.1)
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
I, [2014-12-02T02:18:29.591951 #726] INFO -- : Writing /tmp/build_98b743445a7a66fe8626ac85bbd79632/public/assets/glyphicons-halflings-regular-6572f83b3f4a158d107325ec2b878cbe.eot
I, [2014-12-02T02:18:29.594241 #726] INFO -- : Writing /tmp/build_98b743445a7a66fe8626ac85bbd79632/public/assets/glyphicons-halflings-regular-5b9db2babc068b0779bc5e895ed4386d.svg
I, [2014-12-02T02:18:29.596441 #726] INFO -- : Writing /tmp/build_98b743445a7a66fe8626ac85bbd79632/public/assets/glyphicons-halflings-regular-a53fcfd09adcad8b6ad046a244a815f0.ttf
I, [2014-12-02T02:18:29.598201 #726] INFO -- : Writing /tmp/build_98b743445a7a66fe8626ac85bbd79632/public/assets/glyphicons-halflings-regular-917c2421bd334517fcd2892224654b37.woff
I, [2014-12-02T02:18:29.601476 #726] INFO -- : Writing /tmp/build_98b743445a7a66fe8626ac85bbd79632/public/assets/3dDoge-414b0885d06d68d5cd7c2c126176e357.gif
I, [2014-12-02T02:18:39.653432 #726] INFO -- : Writing /tmp/build_98b743445a7a66fe8626ac85bbd79632/public/assets/application-9d647aa1b7daef52524576ac3d3ae9db.js
rake aborted!
Sass::SyntaxError: Invalid CSS after "...":3,"sources":[": expected "|", was ""less/theme.les..."
(in /tmp/build_98b743445a7a66fe8626ac85bbd79632/app/assets/stylesheets/application.css)
(sass):472
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1147:in `expected'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1085:in `expected'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1080:in `tok!'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:785:in `attrib_name!'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:753:in `attrib'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:672:in `simple_selector_sequence'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:646:in `_selector'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:619:in `selector'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:603:in `selector_sequence'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:528:in `ruleset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:591:in `block in declaration_or_ruleset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1123:in `call'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:1123:in `rethrow'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:592:in `declaration_or_ruleset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:554:in `block_child'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:543:in `block_contents'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:535:in `block'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:529:in `ruleset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:553:in `block_child'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:546:in `block_contents'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:82:in `stylesheet'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/scss/parser.rb:27:in `parse'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/engine.rb:342:in `_to_tree'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/engine.rb:315:in `_render'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sass-3.2.19/lib/sass/engine.rb:262:in `render'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/sass_compressor.rb:24:in `evaluate'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:197:in `block in evaluate'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `each'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/context.rb:194:in `evaluate'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/bundled_asset.rb:25:in `initialize'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `new'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:377:in `build_asset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:211:in `block in find_asset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:257:in `benchmark'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:210:in `find_asset'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:119:in `block in compile'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `each'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/sprockets/manifest.rb:118:in `compile'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-2.12.3/lib/rake/sprocketstask.rb:146:in `with_logger'
/tmp/build_98b743445a7a66fe8626ac85bbd79632/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.2/lib/sprockets/rails/task.rb:69: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 app
我是新的在這,我不知道我現在搞砸了。請幫忙!
我還檢查我的樣式表,我無法找到是我的構建日誌中的錯誤:
*= require_tree .
*= require_self
*/
#map {
width: 100%;
height: 500px;
margin-bottom: 20px;
border: 1px solid #ccc;
border-radius: 4px;
}
body {
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333;
background-color: #fff;
background-image: url(https://www.moj.io/wp-content/uploads/mojio_spiderweb_bkg.jpg);
padding: 10px;
}
h1 {
color: #666;
font-size: 2.1em;
font-weight: 800;
margin-bottom: 20px;
padding-left: 65px;
text-transform: uppercase;
background-image: url(https://www.moj.io/wp-content/uploads/2013/09/mojioappicon.png);
background-position: center left;
background-repeat: no-repeat;
background-size: 50px;
height: 50px;
text-shadow: 0px 2px 4px #FFF;
}
result {
padding-bottom: 15px;
color: #FF8800;
font-weight: 500;
font-style: italic;
text-align: center;
}
footer {
background-image: url(https://www.moj.io/wp-content/uploads/Mojio_Logo_400x400.png);
background-position: center center;
background-repeat: no-repeat;
background-size: 50px;
height: 50px;
padding: 10px;
background-color: #FFF;
border: 1px solid #ccc;
border-radius: 6px;
}
哪個文件是此錯誤在?儘管如此,在我遇到此問題之前,我沒有更改任何代碼。 – toiletmuffin 2014-12-02 03:25:49
@toiletmuffin,它在「theme.less」中說。像這樣的錯誤經常發生。 production.rb中還有一個標誌,我不記得它叫什麼,就像「資產」,所以它應該改變爲相反的值,它可能也會幫助你。 – 2014-12-02 03:57:26
我翻看文件夾,我找不到這樣的文件。在嘗試預編譯資產之前,是否有辦法回到事情的方式? – toiletmuffin 2014-12-02 04:24:22