您好我是一名新的Ruby on rails学生,目前在实施Divise后Git Pushing to Heroku存在问题。
我收到以下错误
Preparing app for Rails asset pipeline Running: rake assets:precompile rake aborted! /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/config/environments/production.rb:83: unterminated string meets end of file /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/config/environments/production.rb:83: syntax error, unexpected end-of-input, expecting '}' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `block in <class:Engine>' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `instance_exec' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:30:in `run' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:55:in `block in run_initializers' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `each' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:44:in `tsort_each_child' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/initializable.rb:54:in `run_initializers' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:215:in `initialize!' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/railtie/configurable.rb:30:in `method_missing' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/config/environment.rb:5:in `<top (required)>' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:189:in `require_environment!' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/railties-4.0.2/lib/rails/application.rb:250:in `block in run_tasks_blocks' /tmp/build_a1864c40-58f6-4071-bc76-b9fed6b25e64/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define' Tasks: TOP => environment (See full trace by running task with --trace) ! ! Precompiling assets failed. ! ! Push rejected, failed to compile Ruby app
通过在线研究,似乎解决方案应该是
#required for Heroku
config.assets.initialize_on_precompile = false
在application.rb中,但这不起作用。
有什么想法吗?
这是Github页面
https://github.com/cablecharlz/pinteresting
提前致谢, 查尔斯
答案 0 :(得分:0)
尝试阅读错误消息。
好像你有问题“语法错误,意外的输入结束,期待'}'” /config/environments/production.rb
行:83