git - 当我尝试在heroku上推送我的rails应用程序时,资产预编译不起作用
问题描述
我从两周开始就学习 Rails,我想将我的项目推向 heroku,但我从 2 天开始尝试,当我这样做时我遇到了同样的错误$git push gossip-project master
:
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: ArgumentError: wrong number of arguments (given 0, expected 1..2)
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/cache/file_store.rb:24:in `initialize'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/cache.rb:60:in `new'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/cache.rb:60:in `lookup_store'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4.2/lib/rails/application/bootstrap.rb:67:in `block in <module:Bootstrap>'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:32:in `instance_exec'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:32:in `run'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:61:in `block in run_initializers'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4.2/lib/rails/initializable.rb:60:in `run_initializers'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4.2/lib/rails/application.rb:361:in `initialize!'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/bootsnap-1.4.6/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `block in require'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:257:in `load_dependency'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/activesupport-5.2.4.2/lib/active_support/dependencies.rb:291:in `require'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4.2/lib/rails/application.rb:337:in `require_environment!'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/railties-5.2.4.2/lib/rails/application.rb:520:in `block in run_tasks_blocks'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote: /tmp/build_3590ca37744ff815b68e359812cf998d/vendor/bundle/ruby/2.5.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote:
remote: !
remote: ! Precompiling assets failed.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to guarded-river-63918.
remote:
To https://git.heroku.com/guarded-river-63918.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/guarded-river-63918.git'
我尝试了我在不同论坛上看到的所有可能性,但这不起作用。但是我可以毫无问题地在heroku上推送一个新的rails应用程序。我不知道有什么问题。谢谢你的帮助,我很抱歉我的英语很糟糕,我不会说英语。尼尔斯
解决方案
推荐阅读
- c - 为什么我收到写访问冲突异常
- python - 使用python进行主成分回归
- android - Android DataBindingClasses 不会立即更新
- git - git push 到分支以触发构建
- excel - Excel 在行中最右边的字母数字单元格中查找值
- branch.io - How to implement customized unfurling (preview snippets) with Branch.io quick links?
- jenkins - 如何在 Jenkins 中为工件添加时间戳
- c++11 - 在 C++14 中的结构内访问联合中的字符串
- php - 我想在 Android 中使用 PHP 将用户密码存储在 MySQL 远程数据库中!谁能帮我吗?
- node.js - 在快速响应中从 Content-type 中删除字符集