2012-06-07 116 views
3

命令了同樣的錯誤: 混帳推Heroku的主我想混帳推Heroku的,但已經越來越下面

消息

Counting objects: 187, done. 
Delta compression using up to 2 threads. 
Compressing objects: 100% (165/165), done. 
Writing objects: 100% (187/187), 41.33 KiB, done. 
Total 187 (delta 50), reused 0 (delta 0) 

-----> Heroku receiving push 
-----> Ruby/Rails app detected 
sh: Syntax error: Unterminated quoted string 
! 
!  Invalid RUBY_VERSION specified: <internal:lib/rubygems/custom_require>:29:in-`require':-no-such-file-to-load----execjs-LoadError-<internal:lib/rubygems/custom_require>:29:in-`require'-/tmp/build_60rm0lhvvqx7/Gemfile:1:in-`eval_gemfile'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler/dsl.rb:32:in-`instance_eval'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler/dsl.rb:32:in-`eval_gemfile'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler/dsl.rb:7:in-`evaluate'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler/definition.rb:18:in-`build'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler.rb:142:in-`definition'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler/cli.rb:633:in-`platform'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler/vendor/thor/task.rb:22:in-`run'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler/vendor/thor/invocation.rb:118:in-`invoke_task'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler/vendor/thor.rb:263:in-`dispatch'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/lib/bundler/vendor/thor/base.rb:386:in-`start'-/tmp/bundler-20120607-470-s30ash/gems/bundler-1.2.0.pre/bin/bundle:13:in-`<top-(required)>'-/tmp/bundler-20120607-470-s30ash/bin/bundle:19:in-`load'-/tmp/bundler-20120607-470-s30ash/bin/bundle:19:in-`<main>'-There-was-an-error-in-your-Gemfile,-and-Bundler-cannot-continue. 
!  Valid versions: ruby-1.9.3-p0, ruby-1.9.3-p125, rbx-1.2.4, rbx-2.0.0dev-20120115-1.9, rbx-2.0.0dev-20120115-1.8, rbx-2.0.0dev-20120123-1.9, rbx-2.0.0dev-20120123-1.8, ruby-1.9.2-p290, jruby-1.6.5.1, jruby-1.6.7, ruby-1.9.3, ruby-1.9.2 
! 
    sh: Syntax error: Unterminated quoted string 
!  Heroku push rejected, failed to compile Ruby/rails app 

    To [email protected]:blazing-fire-8664.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:blazing-fire-8664.git' 
[email protected]:~/rails_projects/sample_app$ Invalid RUBY_VERSION specified: <internal:lib/rubygems/custom_require>:29:in-`require':-no-such-file-to-load----execjs-LoadError-<internal:lib/rubygems/custom_require>:29:in-`require'-/tmp/build_1b5u4o8udl3vu/Gemfile:1:in-`eval_gemfile'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler/dsl.rb:32:in-`instance_eval'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler/dsl.rb:32:in-`eval_gemfile'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler/dsl.rb:7:in-`evaluate'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler/definition.rb:18:in-`build'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler.rb:142:in-`definition'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler/cli.rb:633:in-`platform'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler/vendor/thor/task.rb:22:in-`run'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler/vendor/thor/invocation.rb:118:in-`invoke_task'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler/vendor/thor.rb:263:in-`dispatch'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/lib/bundler/vendor/thor/base.rb:386:in-`start'-/tmp/bundler-20120607-4420-16eeuqu/gems/bundler-1.2.0.pre/bin/bundle:13:in-`<top-(required)>'-/tmp/bundler-20120607-4420-16eeuqu/bin/bundle:19:in-`load'-/tmp/bundler-20120607-4420-16eeuqu/bin/bundle:19:in-`<main>'-There-was-an-error-in-your-Gemfile,-and-Bundler-cannot-continue. 
bash: syntax error near unexpected token `(' 
+0

有同樣的問題,任何線索? – marquies

回答

4

對於其他人誰的土地在這裏.. 。

我有同樣的確切的錯誤,在我的情況下,這是因爲我的Gemfile錯誤。

的Gemfile中導致錯誤:

source "http://rubygems.org" 
require 'gem-name-here' 
require 'another-gem-here' 

原本應該已經:

source "http://rubygems.org" 
gem 'gem-name-here' 
gem 'another-gem-here' 

(我複製了 「規定」 從Ruby腳本文件中的行我工作了,忘了改變他們說「寶石」,而不是。)

0

我的錯誤是由rake任務引起的棄用評論。

rake assets:precompile --dry-run 

固定rake任務(或只是註釋掉它)固定Heroku的部署:我可以觸發棄用錯誤。

0

我在這花了半天時間,並意識到我已經添加了一個帶有.yml文件並具有不同環境配置的gem。我忘記了我的Heroku環境是我創建的一個名爲「staging」的自定義環境,而.yml文件沒有定義它。