【发布时间】:2014-07-04 11:24:25
【问题描述】:
我正在尝试使用此教程将我的 rails 应用程序部署到 heroku:
https://devcenter.heroku.com/articles/getting-started-with-rails4
所以,我使用 rails 4.1.1 和 ruby 2.1.1
我的 Gemfile 里面有 gem 'rails_12factor', group: :production。
我的应用程序.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上禁用资产预编译和缩小?
请帮帮我! 谢谢
【问题讨论】:
标签: heroku ruby-on-rails-4 asset-pipeline assets precompile