资产:预编译完成后,为什么需要资产宝石?

时间:2012-10-05 06:34:27

标签: ruby-on-rails ruby-on-rails-3 rake ruby-on-rails-3.2 therubyracer

给出下面的gemfile,并且资产是预先编译并手动上传的,为什么命令

rake RAILS_ENV=production db:schema:load

导致红宝石抱怨“资产”中的宝石没有安装?我认为资产只用于生产或没有预编译的地方?

问题是rubyracer,似乎需要less / sass不能在目标架构(arm处理器)上编译

# gemfile
source 'https://rubygems.org'

gem 'rails', '>= 3.2.8'
gem 'bcrypt-ruby', '>= 3.0.1'
gem 'faker', '1.0.1'
gem 'uuidtools'
gem 'simple_form', '>= 2.0.0'
gem 'devise'
gem 'pg', '>= 0.12.2'
gem 'json'
gem 'jquery-rails'

group :development, :test do
  gem 'sqlite3', '>= 1.3.5'
  gem 'rspec-rails', '>= 2.11.0'
  gem 'annotate'
end

# Gems used only for assets and not required
# in production environments by default.

group :assets do
  gem 'coffee-rails', '>= 3.2.2'
  gem 'uglifier', '>= 1.2.3'
  gem 'therubyracer'
  gem 'sass-rails'
  gem 'less-rails'
  gem 'less-rails-bootstrap'
  gem 'will_paginate'
  gem 'bootstrap-will_paginate'
  gem 'less-rails-fontawesome'
end

group :test do
   gem 'capybara', '>= 1.1.2'
   gem 'rb-fchange'
   gem 'rb-notifu'
   gem 'factory_girl_rails'
   gem 'database_cleaner'
end

1 个答案:

答案 0 :(得分:1)

试试这个,gem'therubyracer'写下资产。

group :production do
 gem 'therubyracer'
end

然后捆绑安装