加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

如何禁用heroku上的资产编译?

发布时间:2020-12-14 04:59:28 所属栏目:百科 来源:网络整理
导读:我正在尝试使用这个turtorial将我的rails应用程序部署到heroku: https://devcenter.heroku.com/articles/getting-started-with-rails4 所以,我使用rails 4.1.1和ruby 2.1.1 我的Gemfile有gem’track_12factor’,group ::: inside inside. 我的application.r
我正在尝试使用这个turtorial将我的rails应用程序部署到heroku:

https://devcenter.heroku.com/articles/getting-started-with-rails4

所以,我使用rails 4.1.1和ruby 2.1.1

我的Gemfile有gem’track_12factor’,group ::: inside inside.

我的application.rb:

require File.expand_path('../boot',__FILE__)

require 'rails/all'

Bundler.require(*Rails.groups)

module Charticus
  class Application  Rails::Application
    # Settings in config/environments/* take precedence over those specified here.
    # Application configuration should go into files in config/initializers
    # -- all .rb files in that directory are automatically loaded.

    # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
    # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
    # config.time_zone = 'Central Time (US & Canada)'

    # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
    # config.i18n.load_path += Dir[Rails.root.join('my','locales','*.{rb,yml}').to_s]
    # config.i18n.default_locale = :de
  end
end

我创建了文件public / assets / manifest.yml

但是当我将应用程序部署到heroku时 – 它将我的所有js文件文件编译为application.js和所有css文件application.css.而且我无法在app.heroku.com上使用firebug看到它.

我需要用我的配置来查看app.heroku.com上的所有js和css文件?
如何在heroku上禁用资产预编译和缩小?

请帮帮我!
谢谢

解决方法

LIB /任务/ assets.rake

Rake::Task["assets:precompile"].clear
   namespace :assets do
     task 'precompile' do
     puts "Not pre-compiling assets..."
   end
end

你完成了.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读