问题描述
难以推动heroku。我使用最新版本的rails和ruby。每次我尝试上传到heroku时,我都会收到此消息。[code]
$ git push heroku master
警告:将IP地址'50 .19.85.132'的RSA主机密钥永久添加到已知主机列表中。
初始化仓库,完成。
计数对象:69,完成。
使用多达8个线程的增量压缩。
压缩对象:100%(58/58),完成。
写作对象:100%(69/69),15.99 KiB | 0字节/秒,完成。
总计69(delta 5),重用0(delta 0)
-----> Ruby应用检测到
----->编译Ruby / Rails
/app/tmp/buildpacks/ruby/lib/language_pack/helpers/bundler_wrapper.rb:88:in`block in ruby_version':解析Gemfile时出错,我们无法继续(LanguagePack: :Helpers :: BundlerWrapper :: GemfileParseError)
Gemfile发生错误,Bundler无法继续。
from /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:`yield_with_block_depth'
from /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:在`realtime'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:在`instrument'中
从/app/tmp/buildpacks/ruby/lib/language_pack/helpers/bundler_wrapper.rb:76:in`instrument'
from / app / tmp / buildpacks / ruby / lib /从/app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:180:in`block in ruby_version'
from /app/tmp/buypack/rb:180:'ruby_version'
中的language_pack / helpers / bundler_wrapper.rb: app / tmp / buildpacks / ruby / lib / language_pack / instrument.rb:18:在'block(2 levels)in instrument'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb: 40:在yield_with_block_depth中
from /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:`实时'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in`instrument'
from / app / tmp / buildpacks / ruby / lib / language_pack / base.rb:47:'instrument'
from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in`instrument'$ b $ from /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`block in install_ruby'
from /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:在'yield_with_block_depth'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:17:in'block in instrument'$ b $ / from /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'
from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb: 47:在`instrument'中
从/app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in`instrument'
from / app / tmp / buildpacks / ruby / lib / language_pack / ruby.rb:258:在`install_ruby'
from /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:在'block(2 levels)in instrument'
from /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`block in instrument'
from /app/vendor/ruby-1.9.2/ lib / ruby / 1.9.1 / benchmark.rb:310:在`realtime'
from /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'
from / app / tmp / buildpacks / ruby / lib / language_pack / base.rb:43:`instrument'
from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:83:in`compile'$ b $ from /app/tmp/buildpacks/ruby/lib/language_pack/rails2.rb:49:in`block in compile'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb: 18:在`block(2 levels)in instrument'
from /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:在`block in instrument'
from /app/vendor/ruby-1.9.2/lib/ruby/1.9.1/benchmark.rb:310:在`实时'中
从/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in`instrument'
from / app / tmp / buildpacks / ruby / lib / language_pack / base.rb:47:在`instrument'中
from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in`instrument'
from / app / tmp / buildpacks / ruby / lib / language_pack / rails2.rb:47:在`compile'中$ / $ b /从/ app / tmp / buildpacks / ruby / lib / lan guage_pack / rails3.rb:38:在`block in compile'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:18:in`block(2 levels)in instrument'$ b $ from /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`block in instrument'
from /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:`instrument'
from /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'
from /app/tmp/buildpacks/ruby/lib/language_pack/rails3.rb:37:in`编译'
from /app/tmp/buildpacks/ruby/lib/language_pack/rails4.rb:41:in`block in compile'
from / app / tmp / buildpacks / ruby / lib / language_pack / instrument.rb:18:在'block(2 levels)in instrument'
from / 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`block in instrument'
from /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:在`instrument'
from /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'
from /app/tmp/buildpacks/ruby/lib/language_pack/rails4.rb:40:in`compile'
from / app / tmp / buildpacks / ruby / bin / compile:15:在< main>中的block(2 levels)中:
from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:124:in`在/ app / tmp / buildpacks / ruby / lib / language_pack / instrument中输入
从/ app / tmp / buildpacks / ruby / bin / compile:14:在`block in< main>' .rb:35:在`call'中
从/app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in`block in trace'
从/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:在`yield_with_block_depth'
from /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:在'realtime'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in`instrument'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in`trace'
from / app / tmp / buildpacks / ruby / bin / compile:10:in` < main>'
!推送被拒绝,未能编译Ruby应用程序
到[email protected]:aqueous-crag-8467.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:未能推送一些文件到'[email protected]:aqueous-crag-8467.git'
Richards-MacBook-Pro-2:hockeyapp richardlane $ bundle --version
Bundler版本1.7.3
[/ code]
这里是我的gemfile:
$ p $ #Bundle edge Rails改为:gem'rails',github:'rails / rails'
gem'rails','4.1.6'
#使用sqlite3作为Active Record的数据库
组:生产do
gem'pg'
结束
组:开发do
gem'sqlite3'
结束
#在样式表中使用SCSS
gem'sass-rails','〜> 4.0.3'
#使用Uglifier作为Javascript资源的压缩器
gem'uglifier','> = 1.3.0'
#使用CoffeeScript for .js.coffee资产和视图
gem'coffee-rails','〜> 4.0.0'
#请参阅https://github.com/sstephenson/execjs#readme了解更多受支持的运行时间
#gem'therubyracer',平台:: ruby
#使用jquery作为Javascript库
gem'jquery-rails'
#Turbolinks使以下链接您的Web应用程序更快。阅读更多:https://github.com/rails/turbolinks
gem'turbolinks'
#轻松构建JSON API。阅读更多:https://github.com/rails/jbuilder
gem'jbuilder','〜> 2.0'
#bundle exec rake doc:rails在doc / api下生成API。
gem'sdoc','〜> 0.4.0',组::doc
#Spring通过让应用程序在后台运行来加快开发速度。阅读更多:https://github.com/rails/spring
gem'spring',group::development
[/ code]
对于Rails'4.1.6'版本,所需的 Ruby 版本必须大于或等于(> = ) 1.9.3 。
因此,添加像1.9.3p2,1.9.3-p547,2.0.0-p576,2.1.1等任何ruby版本;
Having a hard time pushing to heroku. Im using the most current version of rails and ruby. Each time I try to upload to heroku I get this message.[code]$ git push heroku masterWarning: Permanently added the RSA host key for IP address '50.19.85.132' to the list of known hosts.Initializing repository, done.Counting objects: 69, done.Delta compression using up to 8 threads.Compressing objects: 100% (58/58), done.Writing objects: 100% (69/69), 15.99 KiB | 0 bytes/s, done.Total 69 (delta 5), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling 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)
There was an error in your Gemfile, and Bundler cannot continue.
from /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'
from /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'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:16:in `instrument'
from /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'
from /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 `block (2 levels) in instrument'
from /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 `block in instrument'
from /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'
from /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'
from /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 `block in install_ruby'
from /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'
from /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'
from /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'
from /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'
from /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 `block (2 levels) in instrument'
from /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 `block in instrument'
from /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'
from /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'
from /app/tmp/buildpacks/ruby/lib/language_pack/ruby.rb:83:in `compile'
from /app/tmp/buildpacks/ruby/lib/language_pack/rails2.rb:49:in `block in compile'
from /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'
from /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'
from /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'
from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in `instrument'
from /app/tmp/buildpacks/ruby/lib/language_pack/rails2.rb:47:in `compile'
from /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 `block (2 levels) in instrument'
from /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 `block in instrument'
from /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'
from /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'
from /app/tmp/buildpacks/ruby/lib/language_pack/rails3.rb:37:in `compile'
from /app/tmp/buildpacks/ruby/lib/language_pack/rails4.rb:41:in `block in compile'
from /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'
from /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'
from /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'
from /app/tmp/buildpacks/ruby/lib/language_pack/base.rb:43:in `instrument'
from /app/tmp/buildpacks/ruby/lib/language_pack/rails4.rb:40:in `compile'
from /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'
from /app/tmp/buildpacks/ruby/bin/compile:14:in `block in <main>'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in `call'
from /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 `block (2 levels) in instrument'
from /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 `block in instrument'
from /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'
from /app/tmp/buildpacks/ruby/lib/language_pack/instrument.rb:35:in `trace'
from /app/tmp/buildpacks/ruby/bin/compile:10:in `<main>'
! Push rejected, failed to compile Ruby app
To [email protected]:aqueous-crag-8467.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:aqueous-crag-8467.git'
Richards-MacBook-Pro-2:hockeyapp richardlane$ bundle --version
Bundler version 1.7.3
[/code]
and here is my gemfile:
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.6'
# Use sqlite3 as the database for Active Record
group :production do
gem 'pg'
end
group :development do
gem 'sqlite3'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for Javascript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the Javascript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
[/code]
For Rails '4.1.6' version, the required Ruby version must be greater than or equals to (>=) 1.9.3.
So add any of the ruby versions like 1.9.3p2, 1.9.3-p547, 2.0.0-p576, 2.1.1 etc;
这篇关于分析Gemfile时出错;无法部署到Heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!