所以我在rails应用程序上创建了一个ruby,我无法在Heroku中部署,因为我无法执行 heroku run rake db:migrate 。 在localhost中,当我尝试在Heroku中部署它时,应用程序运行良好。 它中止并说以下内容:
$ heroku run rake db:migrate
Running rake db:migrate on ⬢ tranquil-refuge-88028... up, run.7134 (Free)
rake aborted!
ArgumentError: Invalid option: harmony
/app/vendor/bundle/ruby/2.3.0/gems/uglifier-2.7.2/lib/uglifier.rb:168:in `block in initialize'
/app/vendor/bundle/ruby/2.3.0/gems/uglifier-2.7.2/lib/uglifier.rb:167:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/uglifier-2.7.2/lib/uglifier.rb:167:in `initialize'
/app/config/environments/production.rb:27:in `new'
/app/config/environments/production.rb:27:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:211:in `instance_eval'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/railtie.rb:211:in `configure'
/app/config/environments/production.rb:1:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:600:in `block (2 levels) in <class:Engine>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:599:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/engine.rb:599:in `block in <class:Engine>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:48:in `tsort_each_child'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:in `require'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:in `require_environment!'
/app/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:445:in `block in run_tasks_blocks'
/app/vendor/bundle/ruby/2.3.0/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
我的文件config / environments / production.rb是这样的:
Rails.application.configure do
...
[line 26 ] # Compress JavaScripts and CSS.
[line 27 ] config.assets.js_compressor = Uglifier.new( :harmony => true )
任何人都可以帮助我吗?
由于
答案 0 :(得分:0)
如果它在开发中工作正常,请确保您没有在js中使用任何 let 语句。