如何在heroku中部署?

时间:2014-08-12 10:20:43

标签: macos heroku

我不会使用ruby在rails上部署heroku。我试着称赞“git push heroku master”。 但收到错误消息。帮帮我。我使用的是Mac OS 10.9。

初始化存储库,完成。 计数对象:430,完成。 Delta压缩最多使用4个线程。 压缩对象:100%(371/371),完成。 书写对象:100%(430/430),852.48 KiB | 70.00 KiB / s,完成了。 总计430(158),重复使用139(delta 25)

- - - - &GT;检测到Ruby应用 -----&GT;编译Ruby / Rails /app/tmp/buildpacks/ruby/lib/language_pack/helpers/bundler_wrapper.rb:88:in block in ruby_version': There was an error parsing your Gemfile, we cannot continue (LanguagePack::Helpers::BundlerWrapper::GemfileParseError) Gemfile syntax error on line 68: syntax error, unexpected tIDENTIFIER, expecting $end gem 'rails_12factor', group: :production ^ from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in块(2级)in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in yield_with_block_depth' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in阻止仪器'     来自/app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in realtime' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/helpers/bundler_wrapper.rb:76:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/helpers/bundler_wrapper.rb:80:in ruby​​_version'     来自/app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:180:in block in ruby_version' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in块(2级)in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in yield_with_block_depth' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in阻止仪器'     来自/app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in realtime' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:173:in ruby_version' from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:259:in块中的install_ruby'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in block (2 levels) in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in yield_with_block_depth'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in block in instrument' from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in realtime'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:258:in install_ruby'     来自/app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:88:in block in compile' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in块(2级)in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in yield_with_block_depth' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in阻止仪器'     来自/app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in realtime' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:83:in compile' from /app/tmp/buildpacks/ruby/lib/language_pack/rails2.rb:49:in块编译'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in block (2 levels) in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in yield_with_block_depth'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in block in instrument' from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in realtime'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/rails2.rb:47:in编译'     来自/app/tmp/buildpacks/ruby/lib/language_pack/rails3.rb:38:in block in compile' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in块(2级)in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in yield_with_block_depth' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in阻止仪器'     来自/app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in realtime' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/rails3.rb:37:in compile' from /app/tmp/buildpacks/ruby/lib/language_pack/rails4.rb:41:in阻止编译'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in block (2 levels) in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in yield_with_block_depth'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in block in instrument' from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in realtime'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:47:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in instrument' from /app/tmp/buildpacks/ruby/lib/language_pack/rails4.rb:40:in编译'     来自/ app / tmp / buildpacks / ruby​​ / bin / compile:15:in block (2 levels) in <main>' from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:124:in log'     来自/ app / tmp / buildpacks / ruby​​ / bin / compile:14:in block in <main>' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in call'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in block in trace' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in块(2级)in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:40:in yield_with_block_depth' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in阻止仪器'     来自/app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:in realtime' from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in instrument'     来自/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in trace' from /app/tmp/buildpacks/ruby/bin/compile:10:in'

!推送拒绝,无法编译Ruby应用程序

2 个答案:

答案 0 :(得分:1)

它表示你在线上有一个解析错误 gem 'rails_12factor', group: :production

如果你这样写的话应该有效:

group :production do
    gem 'rails_12factor'
end

答案 1 :(得分:0)

heroku创建AppName --stack cedar --buildpack https://github.com/heroku/heroku-buildpack-ruby.git