heroku推被拒绝,无法编译Ruby应用程序

heroku push rejected, failed to compile Ruby app

当我运行命令"git push-f heroku"时,我得到以下问题:

Fetching repository, done.
Counting objects: 55, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (30/30), done.
Writing objects: 100% (35/35), 9.26 KiB | 0 bytes/s, done.
Total 35 (delta 20), reused 14 (delta 2)

-----> Removing .DS_Store files

-----> Ruby app detected

-----> Compiling Ruby/Rails

-----> Using Ruby version: ruby-2.0.0

-----> Installing dependencies using 1.5.2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
   Ruby version change detected. Clearing bundler cache.
   Old: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
   New: ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux]
   Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --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:
   * geocoder
   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:
   * geocoder

!
! Failed to install gems via Bundler.
!

! Push rejected, failed to compile Ruby app

To [email protected]:tummystuffer.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:tummystuffer.git'

因此,我在gemfile中添加了gem"geocoder",删除了gemfile.lock,运行了"bundle install"、"git add"、"git commit",并再次推送,但得到了相同的准确错误。

我试图从中解决这个问题:HerokuPush被拒绝,未能编译Ruby/Rails应用程序,但仍然给了我同样的错误。

我已经运行了"gem cleanup"和"gem update",但没有工作。

这是我的GemFile:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.0'

# Rails defaults
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'

# rails-bootstrap
gem 'activerecord-tableless'
gem 'bootstrap-sass'
gem 'figaro'
gem 'google_drive'
gem 'high_voltage'
gem 'simple_form', '>= 3.0.0.rc'
group :development, :test do
gem 'sqlite3'
gem 'better_errors'
gem 'quiet_assets'
end
group :production do
gem 'pg'
gem 'thin'
gem 'rails_on_heroku'
end
gem 'therubyracer'
gem 'less-rails'
gem 'twitter-bootstrap-rails'
gem 'mail'
gem 'oauth2'
gem 'omniauth-facebook'
gem 'omniauth-twitter'
gem 'best_in_place'
gem"font-awesome-rails"
gem 'geocoder'

编辑:

这是我的gemfile.lock:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
mail (~> 2.5.4)
actionpack (4.1.0)
actionview (= 4.1.0)
activesupport (= 4.1.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
actionview (4.1.0)
activesupport (= 4.1.0)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.0)
activesupport (= 4.1.0)
builder (~> 3.1)
activerecord (4.1.0)
activemodel (= 4.1.0)
activesupport (= 4.1.0)
arel (~> 5.0.0)
activerecord-tableless (1.3.3)
activerecord (>= 2.3.0)
activesupport (4.1.0)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
best_in_place (0.2.3)
rails (>= 3.0.0)
better_errors (1.1.0)
coderay (>= 1.0.0)
erubis (>= 2.6.6)
bootstrap-sass (3.1.1.1)
sass (~> 3.2)
builder (3.2.2)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
commonjs (0.2.7)
daemons (1.1.9)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (2.0.2)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
figaro (0.7.0)
bundler (~> 1.0)
rails (>= 3, < 5)
font-awesome-rails (4.0.3.1)
railties (>= 3.2, < 5.0)
geocoder (1.2.0)
google_drive (0.3.9)
nokogiri (>= 1.4.4, != 1.5.2, != 1.5.1)
oauth (>= 0.3.6)
oauth2 (>= 0.5.0)
hashie (2.1.1)
high_voltage (2.1.0)
hike (1.2.3)
i18n (0.6.9)
jbuilder (2.0.6)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
jwt (0.1.11)
multi_json (>= 1.5)
less (2.5.0)
commonjs (~> 0.2.7)
less-rails (2.5.0)
actionpack (>= 3.1)
less (~> 2.5.0)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
mini_portile (0.5.3)
minitest (5.3.3)
multi_json (1.9.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
oauth (0.4.7)
oauth2 (0.9.3)
faraday (>= 0.8, < 0.10)
jwt (~> 0.1.8)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
omniauth (1.2.1)
hashie (>= 1.2, < 3)
rack (~> 1.0)
omniauth-facebook (1.6.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth (1.0.1)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.1.2)
faraday (>= 0.8, < 0.10)
multi_json (~> 1.3)
oauth2 (~> 0.9.3)
omniauth (~> 1.2)
omniauth-twitter (1.0.1)
multi_json (~> 1.3)
omniauth-oauth (~> 1.0)
pg (0.17.1)
polyglot (0.3.4)
quiet_assets (1.0.2)
railties (>= 3.1, < 5.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.0)
actionmailer (= 4.1.0)
actionpack (= 4.1.0)
actionview (= 4.1.0)
activemodel (= 4.1.0)
activerecord (= 4.1.0)
activesupport (= 4.1.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.0)
sprockets-rails (~> 2.0)
rails_on_heroku (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.1.0)
actionpack (= 4.1.0)
activesupport (= 4.1.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.1)
ref (1.0.5)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
simple_form (3.1.0.rc1)
actionpack (~> 4.0)
activemodel (~> 4.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
sqlite3 (1.3.9)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
thin (1.6.2)
daemons (>= 1.0.9)
eventmachine (>= 1.0.0)
rack (>= 1.0.0)
thor (0.19.1)
thread_safe (0.3.3)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails
twitter-bootstrap-rails (2.2.8)
actionpack (>= 3.1)
execjs
rails (>= 3.1)
railties (>= 3.1)
tzinfo (1.1.0)
thread_safe (~> 0.1)
uglifier (2.5.0)
execjs (>= 0.3.0)
json (>= 1.8.0)

PLATFORMS
  ruby

DEPENDENCIES
activerecord-tableless
best_in_place
better_errors
bootstrap-sass
coffee-rails (>= 4.0.0)
figaro
font-awesome-rails
geocoder
google_drive
high_voltage
jbuilder (>= 1.2)
jquery-rails
less-rails
mail
oauth2
omniauth-facebook
omniauth-twitter
pg
quiet_assets
rails (>= 4.0.0)
rails_on_heroku
sass-rails (>= 4.0.0)
simple_form (>= 3.0.0.rc)
sqlite3
therubyracer
thin
turbolinks
twitter-bootstrap-rails
uglifier (>= 1.3.0)

任何帮助都将不胜感激。


错误状态:

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.

这基本上意味着你要么没有提交你的Gemfile.lock,要么没有运行bundle install命令,它基本上重建了Gemfile.lock。现在有一个冲突需要您在开发环境中使用bundle install来解决:

1
2
3
4
$ bundle install
$ git add .
$ git commit -a -m"Geocoder"
$ git push -f heroku


我也有同样的问题。一个简单的捆绑安装为我解决了这个问题。在bundle installgit add .git commit之后,我把代码推给了heroku master,它工作了!江户十一〔七〕号


我实际上能够解决这个问题。我发现我正试图把这个项目推进到另一个分支(而不是主分支)。我通过将分支与主分支合并解决了这个问题,并再次推送它。