Heroku:由于NoMethodError而无法推送到heroku

时间:2019-01-25 22:13:02

标签: ruby-on-rails ruby heroku

我跑了(print)("Hello user! Welcome to the program!") name = input("What is your name?") (print)("Hello", name) x = input("What is your favorite number?") y = int(x) // 2 xs = str(x) ys = str(y) z = ("Did you know that half of your favorite number" + ' ' + xs + ' ' + 'is' + ' ' + ys + '?') 并得到了这条长错误消息(被截断了)。如果我没看错,这是问题git push heroic master的主要原因。即使代码在本地计算机上运行,​​如何从终端解决此问题。如果需要更多信息,请告知我,也许在这里告诉我什么地方了。

remote: NoMethodError: undefined method 'split' for {}:Hash

.bundle / config

Total 0 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote:  !     Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote:             Detected buildpacks: Ruby,Node.js
remote:             See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.5.3
remote: 
remote: ###### WARNING:
remote: 
remote:        You have the `.bundle/config` file checked into your repositor
remote:         It contains local state like the location of the installed bundle
remote:         as well as configured git local gems, and other settings that should
remote:        not be shared between multiple checkouts of a single repo. Please
remote:        remove the `.bundle/` folder from your repo and add it to your `.gitignore` file.
remote:        https://devcenter.heroku.com/articles/bundler-configuration
remote: 
remote: -----> Installing dependencies using bundler 1.15.2
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        --- ERROR REPORT TEMPLATE -------------------------------------------------------
remote:        # Error Report
remote:        
remote:        ## Questions
remote:        
remote:        Please fill out answers to these questions, it'll help us figure out
remote:        why things are going wrong.
remote:        
remote:        - **What did you do?**
remote:        
remote:          I ran the command `vendor/bundle/ruby/2.5.0/bin/bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment --no-clean`
remote:        
remote:        - **What did you expect to happen?**
remote:        
remote:          I expected Bundler to...
remote:        
remote:        - **What happened instead?**
remote:        
remote:          Instead, what happened was...
remote:        
remote:        - **Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?**
remote:        
remote:          I tried...
remote:        
remote:        - **Have you read our issues document, https://github.com/bundler/bundler/blob/master/doc/contributing/ISSUES.md?**
remote:        
remote:          ...
remote:        
remote:        ## Backtrace
remote:        
remote:        ```
remote:        NoMethodError: undefined method `split' for {}:Hash
remote:          /tmp/build_571ced5049bd8f6d5aa742e589ae07bf/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/settings.rb:253:in `get_array'
remote:          /tmp/build_571ced5049bd8f6d5aa742e589ae07bf/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/settings.rb:179:in `without'
remote:          /tmp/build_571ced5049bd8f6d5aa742e589ae07bf/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/install.rb:169:in `normalize_groups'
remote:          /tmp/build_571ced5049bd8f6d5aa742e589ae07bf/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/install.rb:24:in `run'
remote:          /tmp/build_571ced5049bd8f6d5aa742e589ae07bf/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:186:in `block in install'
remote:          /tmp/build_571ced5049bd8f6d5aa742e589ae07bf/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/settings.rb:92:in `temporary'
remote:          /tmp/build_571ced5049bd8f6d5aa742e589ae07bf/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:185:in `install'

1 个答案:

答案 0 :(得分:0)

日志警告您有关版本控件上已检查.bundle / config的信息。

从您的仓库中删除并推送您的更改

rm .bundle/config
rmdir .bundle