我是一名 ruby、ruby on rails 和 heroku 新手,正在尝试从Michael Hartl 的 Ruby on Rails 3.2 教程中学习编码。
现在在本章的开头,我未能将所有内容部署到 Heroku。我收到此错误消息(但我没有计划如何解决此问题):
$ 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 看起来像这样:
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,哈哈)。KR,费边