0
我開始瀏覽Odin項目的課程,開始使用Ubuntu,並正在通過Installfests guide on deploying a Rails App.我在步驟2.5遇到問題。新用戶部署失敗
下面是結果我得到:
$ git push heroku master
Counting objects: 117, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (103/103), done.
Writing objects: 100% (117/117), 25.89 KiB | 0 bytes/s, done.
Total 117 (delta 8), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.3.4
remote: -----> Installing dependencies using bundler 1.13.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/.........
remote: Fetching version metadata from https://rubygems.org/..
remote: Fetching dependency metadata from https://rubygems.org/.
remote: Installing rake 12.0.0
remote: Installing i18n 0.8.1
remote: Installing concurrent-ruby 1.0.5
remote: Installing minitest 5.10.1
remote: Installing thread_safe 0.3.6
remote: Installing builder 3.2.3
remote: Installing erubis 2.7.0
remote: Installing mini_portile2 2.1.0
remote: Installing nio4r 2.0.0 with native extensions
remote: Installing rack 2.0.1
remote: Installing websocket-extensions 0.1.2
remote: Installing arel 7.1.4
remote: Installing mime-types-data 3.2016.0521
remote: Installing coffee-script-source 1.12.2
remote: Installing execjs 2.7.0
remote: Installing thor 0.19.4
remote: Installing method_source 0.8.2
remote: Installing multi_json 1.12.1
remote: Installing pg 0.20.0 with native extensions
remote: Installing puma 3.8.2 with native extensions
remote: Using bundler 1.13.7
remote: Installing sass 3.4.23
remote: Installing tilt 2.0.7
remote: Installing turbolinks-source 5.0.0
remote: Installing tzinfo 1.2.3
remote: Installing nokogiri 1.7.1 with native extensions
remote: Installing rack-test 0.6.3
remote: Installing sprockets 3.7.1
remote: Installing websocket-driver 0.6.5 with native extensions
remote: Installing mime-types 3.1
remote: Installing coffee-script 2.4.1
remote: Installing uglifier 3.2.0
remote: Installing turbolinks 5.0.1
remote: Installing activesupport 5.0.2
remote: Installing mail 2.6.4
remote: Installing globalid 0.4.0
remote: Installing activemodel 5.0.2
remote: Installing jbuilder 2.6.3
remote: Installing activejob 5.0.2
remote: Installing activerecord 5.0.2
remote: Installing rails-dom-testing 2.0.2
remote: Installing loofah 2.0.3
remote: Installing rails-html-sanitizer 1.0.3
remote: Installing actionview 5.0.2
remote: Installing actionpack 5.0.2
remote: Installing actioncable 5.0.2
remote: Installing actionmailer 5.0.2
remote: Installing railties 5.0.2
remote: Installing sprockets-rails 3.2.0
remote: Installing rails 5.0.2
remote: Installing coffee-rails 4.2.1
remote: Installing sass-rails 5.0.6
remote: Installing jquery-rails 4.3.1
remote: Bundle complete! 16 Gemfile dependencies, 53 gems now installed.
remote: Gems in the groups development and test were not installed.
remote: Bundled gems are installed into ./vendor/bundle.
remote: Bundle completed (26.35s)
remote: Cleaning up the bundler cache.
remote: -----> Installing node-v6.10.0-linux-x64
remote: -----> Detecting rake tasks
remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: NoMethodError: undefined method `roots' for #<ActionDispatch::Routing::Mapper:0x007fc37aff5b28>
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/config/routes.rb:2:in `block in <top (required)>'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `instance_exec'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `eval_block'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:371:in `draw'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/config/routes.rb:1:in `<top (required)>'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `block in load'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:259:in `load_dependency'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/dependencies.rb:287:in `load'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/file_update_checker.rb:77:in `execute'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application/finisher.rb:119:in `block in <module:Finisher>'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application.rb:352:in `initialize!'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/config/environment.rb:5:in `<top (required)>'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application.rb:328:in `require'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application.rb:328:in `require_environment!'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/railties-5.0.2/lib/rails/application.rb:448:in `block in run_tasks_blocks'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
remote: /tmp/build_e6fc23c1f302b4f1aa2bdeafdf93c2f5/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
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 evening-harbor-57945.
remote:
To https://git.heroku.com/evening-harbor-57945.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/evening-harbor-57945.git'
我嘗試不同的東西,如編輯我的寶石文件替換:
gem 'sqlite3'
有:
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
我也嘗試過更新我的git push heroku master
反饋中所述的gemfile輸入:
gem install bundler
但它會產生相同的結果。
我建議您閱讀完整的「[如何提問問題智能方式](http://catb.org/esr/faqs/smart-questions.html)」。我們不在乎你的經驗是什麼,我們只需要經過充分研究和問題充分的問題。 「[問]」和「[mcve]」很重要,「[Stack Overflow用戶需要多少研究工作?](http://meta.stackoverflow.com/questions/261592)」。從不直接解釋問題的問題中刪除所有內容,特別是道歉。保持簡潔明瞭。你的問題是在百科全書中打開一個新的條目,所以這樣寫。 –
我很欣賞這個反饋。格里讓我轉向正確的方向,而且我還會在未來更好地照顧我的措辭。 – vandudemeister