我正在尝试将我的应用推送到heroku。我输入git push heroku,然后返回:
git push heroku
Counting objects: 55, done.
Compressing objects: 100% (35/35), done.
Writing objects: 100% (36/36), 10.30 KiB, done.
Total 36 (delta 16), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* factory_girl_rails (= 4.2.1)
Bundler Output: You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have deleted from the Gemfile:
* factory_girl_rails (= 4.2.1)
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git@heroku.com:appname.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:appname.git'
我已多次将factory_girl_rails添加到gemfile并将其删除,并随之运行bundle install。
我已经尝试过它给出的指示,但我无法让它发挥作用。
我不确定问题是什么,但它不会推送到heroku。
有人可以帮忙吗?
这是我的gemfile:
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.1'
gem 'bootstrap-sass', '2.3.2.0'
gem 'devise'
group :development, :test do
gem 'sqlite3', '1.3.8'
gem 'rspec-rails', '2.13.1'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
gem 'factory_girl_rails', '4.2.1'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end
这就是我的Gemfile中的factory_girl_rails的样子。
答案 0 :(得分:0)
我通过评论
解决了这个问题config.force_ssl = true
这是在config / environments / production.rb文件中。
知道为什么会导致错误吗?