[英]Having Trouble to deploy a Rails App to Heroku
I'm having trouble to deploy a rails app to Heroku. 我在向Heroku部署rails应用程序时遇到了麻烦。 Heroku is giving me the Error Message An error occurred while installing Ruby ruby-2.1.1
which is confusing me after all that I've done to set everything to ruby 2.0.0. Heroku给我错误消息An error occurred while installing Ruby ruby-2.1.1
这让我很困惑,因为我已经完成了将所有内容设置为ruby 2.0.0。 Any Ideas? 有任何想法吗? Thanks! 谢谢!
My Steps so far: 到目前为止我的步骤:
I made sure that this version is used: rvm use ruby-2.0.0
我确保使用此版本: rvm use ruby-2.0.0
I added the line ruby '2.0.0' to the App's Gemfile 我将行ruby'2.0.0'添加到App的Gemfile中
bundle install
(No Error Messages) 我确实运行了bundle install
(No Error Messages) git push heroku master
我确实运行了git push heroku master
The Heroku Errormessage: Heroku错误消息:
> ~/Desktop/blog(heroku_deploy) git push heroku master
Counting objects: 61, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (49/49), done.
Writing objects: 100% (61/61), 14.77 KiB | 0 bytes/s, done.
Total 61 (delta 26), reused 41 (delta 7)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Removing .DS_Store files
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: !
remote: ! An error occurred while installing Ruby ruby-2.1.1
remote: ! For supported Ruby versions see https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote: ! Note: Only the most recent version of Ruby 2.1 is supported on Cedar-14
remote: ! Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.1.1.tgz -s -o - | tar zxf - ' failed unexpectedly:
remote: !
remote: ! gzip: stdin: unexpected end of file
remote: ! tar: Child returned status 1
remote: ! tar: Error is not recoverable: exiting now
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy....
remote:
remote: ! Push rejected to quiet-springs-8925.
remote:
To https://git.heroku.com/quiet-springs-8925.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/quiet-springs-8925.git'
The Gemfile: Gemfile:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
ruby '2.0.0'
gem 'rails', '4.1.5'
gem 'bcrypt', '3.1.7'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# 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
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
gem 'puma', '2.11.1'
end
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
Heroku doesn't support Ruby 2.1.1. Heroku不支持Ruby 2.1.1。 Like it says in the errors, you can find which ruby runtimes work here . 就像它在错误中所说的那样,你可以在这里找到哪些ruby运行时工作。
Quick look at the Ruby runtimes that work gives: 1.8.7, 1.9.2, 1.9.3, 2.0.0, 2.1.6, 2.2.2. 快速查看有效的Ruby运行时:1.8.7,1.9.2,1.9.3,2.0.0,2.1.6,2.2.2。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.