Rails 本地预编译资产错误

Rails Precompile Assets Error on Local

正在尝试在我的本地计算机上预编译资产。我不断收到以下错误。我该如何解决这个问题?

-ruby 2.3.1p112(2016-04-26 修订版 54768)[x86_64-darwin16] - Rails 5.0.0.1

rake assets:precompile production --trace
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
rake aborted!
Don't know how to build task 'production' (see --tasks)
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/task_manager.rb:71:in `[]'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/application.rb:151:in `invoke_task'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/application.rb:108:in `each'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/application.rb:108:in `block in top_level'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/application.rb:117:in `run_with_threads'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/application.rb:102:in `top_level'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/application.rb:80:in `block in run'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/application.rb:178:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/lib/rake/application.rb:77:in `run'
/usr/local/rvm/gems/ruby-2.3.1/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.3.1/bin/rake:23:in `load'
/usr/local/rvm/gems/ruby-2.3.1/bin/rake:23:in `<main>'

通过RAILS_ENV命令

RAILS_ENV=production bundle exec rake assets:precompile

这样rails将使用生产环境设置预编译资源