Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Heroku断言预编译因coffee-rails-3.2.2而失败_Heroku_Ruby On Rails 3.2_Asset Pipeline_Assets_Cedar - Fatal编程技术网

Heroku断言预编译因coffee-rails-3.2.2而失败

Heroku断言预编译因coffee-rails-3.2.2而失败,heroku,ruby-on-rails-3.2,asset-pipeline,assets,cedar,Heroku,Ruby On Rails 3.2,Asset Pipeline,Assets,Cedar,我最近在Heroku上遇到了这个问题,似乎不知道如何纠正它。该应用程序是运行在ruby 1.9.3上的Rails 3.2.x应用程序。它在本地运行良好,但部署到heroku时,资产的预编译阶段将失败。heroku web dyno堆栈是cedar 我已经在application.rb文件中设置了'config.assets.initialize_on_precompile=false' 下面是部署时收到的错误 Counting objects: 7, done. Compressing obje

我最近在Heroku上遇到了这个问题,似乎不知道如何纠正它。该应用程序是运行在ruby 1.9.3上的Rails 3.2.x应用程序。它在本地运行良好,但部署到heroku时,资产的预编译阶段将失败。heroku web dyno堆栈是cedar

我已经在application.rb文件中设置了'config.assets.initialize_on_precompile=false'

下面是部署时收到的错误

Counting objects: 7, done.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 438 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)

-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using Bundler version 1.3.2
    Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
    Using rake (10.0.3)
    Using i18n (0.6.4)
    Using multi_json (1.6.1)
    Using activesupport (3.2.12)
    Using builder (3.0.4)
    Using activemodel (3.2.12)
    Using erubis (2.7.0)
    Using journey (1.0.4)
    Using rack (1.4.5)
    Using rack-cache (1.2)
    Using rack-test (0.6.2)
    Using hike (1.2.1)
    Using tilt (1.3.4)
    Using sprockets (2.2.2)
    Using actionpack (3.2.12)
    Using mime-types (1.21)
    Using polyglot (0.3.3)
    Using treetop (1.4.12)
    Using mail (2.4.4)
    Using actionmailer (3.2.12)
    Using arel (3.0.2)
    Using tzinfo (0.3.35)
    Using activerecord (3.2.12)
    Using activeresource (3.2.12)
    Using bcrypt-ruby (3.0.1)
    Using coffee-script-source (1.5.0)
    Using execjs (1.4.0)
    Using coffee-script (2.2.0)
    Using rack-ssl (1.3.3)
    Using json (1.7.7)
    Using rdoc (3.12.2)
    Using thor (0.17.0)
    Using railties (3.2.12)
    Using coffee-rails (3.2.2)
    Using orm_adapter (0.4.0)
    Using warden (1.2.1)
    Using devise (2.2.3)
    Using jquery-rails (2.2.1)
    Using pg (0.12.2)
    Using bundler (1.3.2)
    Using rails (3.2.12)
    Using rubygems-bundler (1.1.1)
    Using sass (3.2.6)
    Using sass-rails (3.2.6)
    Using uglifier (1.3.0)
    Your bundle is complete! It was installed into ./vendor/bundle
    Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
    Running: rake assets:precompile
    rake aborted!
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/coffee-rails-3.2.2/lib/rails/generators/coffee/assets/templates/javascript.js.coffee isn't in paths: /tmp/build_18zpsldi56ucr/app/assets/images, /tmp/build_18zpsldi56ucr/app/assets/javascripts, /tmp/build_18zpsldi56ucr/app/assets/stylesheets, /tmp/build_18zpsldi56ucr/vendor/assets/fonts, /tmp/build_18zpsldi56ucr/vendor/assets/javascripts, /tmp/build_18zpsldi56ucr/vendor/assets/stylesheets, /tmp/build_18zpsldi56ucr/vendor/assets/venera_images, /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/coffee-rails-3.2.2/lib/assets/javascripts, /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/jquery-rails-2.2.1/vendor/assets/javascripts
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/asset_attributes.rb:42:in `logical_path'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:160:in `find_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:111:in `block in resolve_dependencies'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:105:in `each'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:97:in `build_required_assets'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:16:in `initialize'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `new'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `block in build_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in `circular_call_protection'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:248:in `build_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:16:in `initialize'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `new'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `build_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/sprockets/static_compiler.rb:19:in `block in compile'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in `block (2 levels) in each_file'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/sprockets/static_compiler.rb:18:in `compile'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/sprockets/assets.rake:56:in `internal_precompile'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
    /tmp/build_18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.12/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
    Tasks: TOP => assets:precompile:primary
    (See full trace by running task with --trace)
    Precompiling assets failed, enabling runtime asset compilation
    Injecting rails31_enable_runtime_asset_compilation
    Please see this article for troubleshooting help:
    http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting
-----> Rails plugin injection
    Injecting rails_log_stdout
    Injecting rails3_serve_static_assets
-----> Discovering process types
    Procfile declares types     -> (none)
    Default types for Ruby/Rails -> console, rake, web, worker

-----> Compiled slug size: 20.8MB
-----> Launching... done, v25
application.css

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_self
 *= require_tree .
 *= require_tree ../../../vendor
 */
application.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
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
//= require_tree ../../../vendor

这应该在ruby 1.9.3上运行,但我在gems路径中看到/tmp/build18zpsldi56ucr/vendor/bundle/ruby/1.9.1/gems/。不确定这是否是问题所在。以前有人在heroku遇到过这个问题吗。谢谢。

由于
:assets
组下的gem未用于生产,您应该将
gem“coffee rails”
行移到该组之外


另外,我认为您的应用程序中不需要这一行。js
*=require_tree../../../vendor

据我所知,链轮忽略了管道中的css和js文件。../../../vendor在那里,因为该目录包含js和css文件。try//=require_tree../../../vendor/assets/javascripts/。您找到答案了吗?我刚刚在这里发布了同样的问题,没有答案
// 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
// the compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
//= require_tree ../../../vendor