Ruby on rails 我的资产没有在Heroku上预编译
我的资产没有在Heroku上预编译。我在cedar上运行,并将application.js和application.css定义为(js): 当我在我的机器上用Ruby on rails 我的资产没有在Heroku上预编译,ruby-on-rails,ruby,heroku,Ruby On Rails,Ruby,Heroku,我的资产没有在Heroku上预编译。我在cedar上运行,并将application.js和application.css定义为(js): 当我在我的机器上用 bundle exec rake assets:precompile RAILS_ENV=production js和css l是有效的。当我部署时,我看到: -----> Preparing app for Rails asset pipeline Running: rake assets:precompile DE
bundle exec rake assets:precompile RAILS_ENV=production
js和css l是有效的。当我部署时,我看到:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_b3aac0a4-54a9-4423-bba2-c15771931ae2/Rakefile:7)
Asset precompilation completed (6.04s)
我的production.rb如下所示:
...
//= require jquery
//= require jquery_ujs
//= require data_table
//= require_tree .
...
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both thread web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
# config.action_dispatch.rack_cache = true
# Disable Rails's static asset server (Apache or nginx will already do this).
config.serve_static_assets = false
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true
# Generate digests for assets URLs.
config.assets.digest = true
# Version of your assets, change this if you want to expire all your assets.
config.assets.version = '1.0'
# Set to :debug to see everything in the log.
config.log_level = :info
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Disable automatic flushing of the log to improve performance.
# config.autoflush_log = false
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
...
以下是我在部署时看到的情况:
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-2.0.0
-----> 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.1.0)
Using i18n (0.6.5)
Using multi_json (1.8.0)
Using activesupport (3.2.6)
Using builder (3.0.4)
Using activemodel (3.2.6)
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.3)
Using tilt (1.4.1)
Using sprockets (2.1.3)
Using actionpack (3.2.6)
Using mime-types (1.25)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.4.4)
Using actionmailer (3.2.6)
Using active_model_serializers (0.8.1)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.6)
Using activeresource (3.2.6)
Using addressable (2.3.5)
Using extlib (0.9.16)
Using autoparse (0.3.3)
Using multi_xml (0.5.5)
Using httparty (0.11.0)
Using json (1.8.0)
Using mini_portile (0.5.1)
Using nokogiri (1.6.0)
Using uuidtools (2.1.4)
Using aws-sdk (1.5.8)
Using bcrypt-ruby (3.0.1)
Using climate_control (0.0.3)
Using cocaine (0.5.1)
Using coffee-script-source (1.6.3)
Using execjs (2.0.1)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.6)
Using coffee-rails (3.2.2)
Using faker (1.2.0)
Using multipart-post (1.2.0)
Using faraday (0.8.8)
Using flickraw (0.9.6)
Using jwt (0.1.8)
Using launchy (2.3.0)
Using signet (0.4.5)
Using google-api-client (0.6.4)
Using jquery-rails (3.0.4)
Using kgio (2.8.1)
Using mono_logger (1.1.0)
Using paperclip (3.5.1)
Using pg (0.16.0)
Using rack-protection (1.5.0)
Using bundler (1.3.2)
Using rails (3.2.6)
Using raindrops (0.12.0)
Using redis (3.0.4)
Using redis-namespace (1.3.1)
Using sinatra (1.4.3)
Using vegas (0.1.11)
Using resque (1.24.1)
Using rufus-scheduler (2.0.24)
Using resque-scheduler (2.0.1)
Using sass (3.2.10)
Using sass-rails (3.2.6)
Using uglifier (2.2.1)
Using unicorn (4.6.3)
Using will_paginate (3.0.4)
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
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7)
Asset precompilation completed (4.63s)
-----> WARNINGS:
Injecting plugin 'rails_log_stdout'
Injecting plugin 'rails3_serve_static_assets'
Add 'rails_12factor' gem to your Gemfile to skip plugin injection
You have not declared a Ruby version in your Gemfile.
To set your Ruby version add this line to your Gemfile:
ruby '2.0.0'
# See https://devcenter.heroku.com/articles/ruby-versions for more information."
-----> Discovering process types
Procfile declares types -> web
Default types for Ruby/Rails -> console, rake, worker
-----> Compiled slug size: 50.7MB
-----> Launching... done, v25
http://NAME.herokuapp.com deployed to Heroku
检测到Ruby/Rails应用程序
----->使用Ruby版本:Ruby-2.0.0
----->使用Bundler 1.3.2版安装依赖项
正在运行:bundle安装--无开发:test--路径vendor/bundle--bin tubs vendor/bundle/bin--部署
使用耙子(10.1.0)
使用i18n(0.6.5)
使用multi_json(1.8.0)
使用activesupport(3.2.6)
使用生成器(3.0.4)
使用activemodel(3.2.6)
使用erubis(2.7.0)
使用旅程(1.0.4)
使用机架(1.4.5)
使用机架缓存(1.2)
使用机架测试(0.6.2)
使用远足(1.2.3)
使用倾斜(1.4.1)
使用链轮(2.1.3)
使用actionpack(3.2.6)
使用mime类型(1.25)
使用polyglot(0.3.3)
使用树梢(1.4.15)
使用邮件(2.4.4)
使用actionmailer(3.2.6)
使用活动的\u模型\u序列化程序(0.8.1)
使用arel(3.0.2)
使用tzinfo(0.3.37)
使用activerecord(3.2.6)
使用activeresource(3.2.6)
使用可寻址(2.3.5)
使用extlib(0.9.16)
使用自动parse(0.3.3)
使用多xml(0.5.5)
使用httparty(0.11.0)
使用json(1.8.0)
使用迷你端口(0.5.1)
使用nokogiri(1.6.0)
使用UUID工具(2.1.4)
使用aws sdk(1.5.8)
使用bcrypt ruby(3.0.1)
使用气候控制(0.0.3)
使用可卡因(0.5.1)
使用coffee脚本源代码(1.6.3)
使用execjs(2.0.1)
使用coffee脚本(2.2.0)
使用机架ssl(1.3.3)
使用rdoc(3.12.2)
使用thor(0.18.1)
使用栏杆(3.2.6)
使用咖啡导轨(3.2.2)
使用伪造者(1.2.0)
使用多部分post(1.2.0)
使用法拉第(0.8.8)
使用flickraw(0.9.6)
使用jwt(0.1.8)
使用launchy(2.3.0)
使用图章(0.4.5)
使用谷歌api客户端(0.6.4)
使用jquery rails(3.0.4)
使用kgio(2.8.1)
使用mono_记录器(1.1.0)
使用回形针(3.5.1)
使用pg(0.16.0)
使用机架保护(1.5.0)
使用捆绑机(1.3.2)
使用轨道(3.2.6)
使用雨滴(0.12.0)
使用redis(3.0.4)
使用redis命名空间(1.3.1)
使用sinatra(1.4.3)
使用维加斯(0.1.11)
使用resque(1.24.1)
使用rufus调度程序(2.0.24)
使用resque调度程序(2.0.1)
使用sass(3.2.10)
使用sass轨道(3.2.6)
使用uglifier(2.2.1)
使用独角兽(4.6.3)
使用will_paginate(3.0.4)
您的包已完成!它已安装到./vendor/bundle中
正在清理绑定器缓存。
----->正在写入config/database.yml以从数据库\u URL读取
----->为Rails资产管道准备应用程序
运行:rake资产:预编译
弃用警告:在供应商/插件中有Rails 2.3风格的插件!对这些插件的支持将在Rails 4.0中删除。将它们移出并打包到您的Gemfile中,或者将它们作为lib/myplugin/*和config/initializers/myplugin.rb折叠到您的应用程序中。有关这方面的更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (从at/tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7调用)
弃用警告:在供应商/插件中有Rails 2.3风格的插件!对这些插件的支持将在Rails 4.0中删除。将它们移出并打包到您的Gemfile中,或者将它们作为lib/myplugin/*和config/initializers/myplugin.rb折叠到您的应用程序中。有关这方面的更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (从at/tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7调用)
弃用警告:在供应商/插件中有Rails 2.3风格的插件!对这些插件的支持将在Rails 4.0中删除。将它们移出并打包到您的Gemfile中,或者将它们作为lib/myplugin/*和config/initializers/myplugin.rb折叠到您的应用程序中。有关这方面的更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (从at/tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7调用)
弃用警告:在供应商/插件中有Rails 2.3风格的插件!对这些插件的支持将在Rails 4.0中删除。将它们移出并打包到您的Gemfile中,或者将它们作为lib/myplugin/*和config/initializers/myplugin.rb折叠到您的应用程序中。有关这方面的更多信息,请参阅发行说明:http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (从at/tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7调用)
已完成资产预编译(4.63s)
----->警告:
注入插件“rails\u log\u stdout”
注入插件“rails3\u服务\u静态\u资产”
将'rails_12factor'gem添加到您的gem文件以跳过插件注入
您尚未在文件中声明Ruby版本。
要设置Ruby版本,请将此行添加到您的文件:
ruby“2.0.0”
#看https://devcenter.heroku.com/articles/ruby-versions 了解更多信息。”
----->发现进程类型
Procfile声明类型->web
Ruby/Rails->console、rake和worker的默认类型
----->编译段塞大小:50.7MB
----->启动…完成,v25
http://NAME.herokuapp.com 部署到Heroku
所以这应该都是上帝的安排,但没有运气。我需要做什么才能启用slug资产编译
更新:
创造
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-2.0.0
-----> 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.1.0)
Using i18n (0.6.5)
Using multi_json (1.8.0)
Using activesupport (3.2.6)
Using builder (3.0.4)
Using activemodel (3.2.6)
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.3)
Using tilt (1.4.1)
Using sprockets (2.1.3)
Using actionpack (3.2.6)
Using mime-types (1.25)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.4.4)
Using actionmailer (3.2.6)
Using active_model_serializers (0.8.1)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.6)
Using activeresource (3.2.6)
Using addressable (2.3.5)
Using extlib (0.9.16)
Using autoparse (0.3.3)
Using multi_xml (0.5.5)
Using httparty (0.11.0)
Using json (1.8.0)
Using mini_portile (0.5.1)
Using nokogiri (1.6.0)
Using uuidtools (2.1.4)
Using aws-sdk (1.5.8)
Using bcrypt-ruby (3.0.1)
Using climate_control (0.0.3)
Using cocaine (0.5.1)
Using coffee-script-source (1.6.3)
Using execjs (2.0.1)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.6)
Using coffee-rails (3.2.2)
Using faker (1.2.0)
Using multipart-post (1.2.0)
Using faraday (0.8.8)
Using flickraw (0.9.6)
Using jwt (0.1.8)
Using launchy (2.3.0)
Using signet (0.4.5)
Using google-api-client (0.6.4)
Using jquery-rails (3.0.4)
Using kgio (2.8.1)
Using mono_logger (1.1.0)
Using paperclip (3.5.1)
Using pg (0.16.0)
Using rack-protection (1.5.0)
Using bundler (1.3.2)
Using rails (3.2.6)
Using raindrops (0.12.0)
Using redis (3.0.4)
Using redis-namespace (1.3.1)
Using sinatra (1.4.3)
Using vegas (0.1.11)
Using resque (1.24.1)
Using rufus-scheduler (2.0.24)
Using resque-scheduler (2.0.1)
Using sass (3.2.10)
Using sass-rails (3.2.6)
Using uglifier (2.2.1)
Using unicorn (4.6.3)
Using will_paginate (3.0.4)
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
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1e4f5b44-48d7-48fc-b409-67b7c5e18c47/Rakefile:7)
Asset precompilation completed (4.63s)
-----> WARNINGS:
Injecting plugin 'rails_log_stdout'
Injecting plugin 'rails3_serve_static_assets'
Add 'rails_12factor' gem to your Gemfile to skip plugin injection
You have not declared a Ruby version in your Gemfile.
To set your Ruby version add this line to your Gemfile:
ruby '2.0.0'
# See https://devcenter.heroku.com/articles/ruby-versions for more information."
-----> Discovering process types
Procfile declares types -> web
Default types for Ruby/Rails -> console, rake, worker
-----> Compiled slug size: 50.7MB
-----> Launching... done, v25
http://NAME.herokuapp.com deployed to Heroku