相关疑难解决方法(0)

uglifier不能在rails中工作

config/application.rb
...
# Enable the asset pipeline
config.assets.enabled = true
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
config.assets.digest = true
config.assets.paths << "#{Rails.root}/vendor/assets/images" 
...


config/environment.rb
...
ENV['RAILS_ENV'] ||= 'production'
...

My gemfile
...
gem 'uglifier'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  #gem 'uglifier'
end
...

environment/production.rb
....
    config.active_support.deprecation …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails-3 asset-pipeline

7
推荐指数
2
解决办法
6126
查看次数

标签 统计

asset-pipeline ×1

ruby-on-rails-3 ×1