Heroku推送被拒绝 - Hartl的Rails 3.2教程 [英] Heroku push rejected - Hartl's Rails 3.2 tutorial
问题描述
我是ruby,ruby on rails和heroku greenhorn,它试图学习从 Michael Hartl的Ruby on Rails 3.2教程。
I am a ruby, ruby on rails and heroku greenhorn, which is trying to learn to code from Michael Hartl's Ruby on Rails 3.2 tutorial.
现在在本章的开头,我没有将所有内容部署到Heroku。这个错误信息我得到了(但我没有计划要做什么来解决这个问题):
Now at the very beginning of this chapter I failed to deployed all to Heroku. This error message I got (but I have no plan what to do to solve this problem):
$ git push heroku master
Counting objects: 69, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (54/54), done.
Writing objects: 100% (69/69), 27.34 KiB, done.
Total 69 (delta 5), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.0.rc
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/
Fetching gem metadata from https://rubygems.org/........
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 3.2.6) ruby depends on
railties (= 3.2.6) ruby
jquery-rails (= 2.0.0) ruby depends on
railties (3.2.7.rc1)
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
To git@heroku.com:pacific-anchorage-8098.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:pacific-anchorage-8098.git'
我的Gemfile看起来像这样:
My Gemfile looks like this:
source 'https://rubygems.org'
gem 'rails', '3.2.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.10.0'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.4'
gem 'coffee-rails', '3.2.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.0'
group :test do
gem 'capybara', '1.1.2'
end
group :production do
gem 'pg', '0.12.2'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
我希望有人能帮助我(对不起,我是一名初学者 - >也是在Stackoverflow,lol)。
KR,Fabian
I hope someone could help me out (sorry, I am a beginner --> also at Stackoverflow, lol). KR, Fabian
推荐答案
现在我可以自己解决问题了。这是方式:
I could now solve the problem by myself. This was the way:
- 转到Gemfile并使用
gem'rails','3.2.6 '至
gem'rails','3.2.7rc1'
。 - 保存
- 运行
bundle install - 不生产
- 运行
git add。$
- 提交给git像
git commit -a -mHeroku重新发送
- 按照
git push
的方式推送到github,然后按照用户名和密码指示
- 和最后
git push heroku master
- Go to Gemfile and change the section with
gem 'rails', '3.2.6'
togem 'rails', '3.2.7rc1'
. - save
- run
bundle install --without production
- run
git add .
- commit to git like
git commit -a -m "Heroku recommit
- push to github like
git push
and follow the instruction for username and password - and last
git push heroku master
哇,这很难,但很有教育意义: - )
Wow, this was hard, but very educational :-)
这篇关于Heroku推送被拒绝 - Hartl的Rails 3.2教程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!