简体   繁体   English

heroku无法推送参考

[英]heroku can't push references

Installing node-v6.11.1-linux-x64
-----> Detecting rake tasks
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       rake aborted!
       SyntaxError:         /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/config/routes.rb:4: syntax error, unexpected keyword_end, expecting end-of-input
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `block in load'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:55:in `block in load_paths'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:55:in `each'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:55:in `load_paths'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:18:in `reload!'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:41:in `block in updater'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/file_update_checker.rb:81:in `execute'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:42:in `updater'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/routes_reloader.rb:31:in `execute_if_updated'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application/finisher.rb:128:in `block in <module:Finisher>'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/config/environment.rb:5:in `<top (required)>'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:in `require'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:329:in `require_environment!'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/railties-5.1.4/lib/rails/application.rb:445:in `block in run_tasks_blocks'
   /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
       /tmp/build_fdfdda041ac97232ad8bd0b00c54c482/vendor/bundle/ruby/2.3.0/gems/rake-    12.3.0/exe/rake:27:in `<top (required)>'
       Tasks: TOP => environment
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !
 !     Push rejected, failed to compile Ruby app.
 !     Push failed

Super new to this stuff, following this tutorial: http://installfest.railsbridge.org/installfest/deploy_a_rails_app 遵循本教程,对此内容是超级新手: http : //installfest.railsbridge.org/installfest/deploy_a_rails_app

I'm not sure why I am getting this precompile error here after entering command "git push heroku master". 我不确定为什么输入命令“ git push heroku master”后在此收到此预编译错误。 Also when I look in the tmp folder for the file that throws the syntax error, it doesn't show up (probably because it goes away after running the command). 另外,当我在tmp文件夹中查找引发语法错误的文件时,它没有显示(可能是因为在运行命令后它消失了)。

In my routes.rb file I have: 在我的routes.rb文件中,我有:

root 'drinks#index'
resources :drinks
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end

The problem is that you have a syntax error in your routes.rb . 问题是您的routes.rb存在语法错误。 The parser is finding an end with no corresponding do (beginning). 解析器正在找到没有相应doend (开始)。 Your complete routes.rb should look like this: 您完整的routes.rb应该如下所示:

Rails.application.routes.draw do
  root 'drinks#index'
  resources :drinks
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM