1
C:\documents\projects\AJP\app>bundle update
Fetching gem metadata from http://rubygems.org/.......
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.7)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.7)
Using erubis (2.6.6)
Using rack (1.2.5)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.33)
Using actionpack (3.0.7)
Using mime-types (1.18)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.7)
Using arel (2.0.10)
Using activerecord (3.0.7)
Using activeresource (3.0.7)
Using bundler (1.1.4)
Using thor (0.14.6)
Using railties (3.0.7)
Using rails (3.0.7)
Using acts-as-taggable-on (2.3.1)
Using annotate (2.4.0)
Using diff-lcs (1.1.3)
Using factory_girl (1.3.3)
Using factory_girl_rails (1.0)
Using faker (0.3.1)
Using gravatar_image_tag (1.0.0.pre2)
Using jquery-rails (1.0.19)
Using nested_form (0.2.0)
Using nokogiri (1.5.2)
Using pg (0.11.0)
Using rspec-core (2.5.2)
Using rspec-expectations (2.5.0)
Using rspec-mocks (2.5.0)
Using rspec (2.5.0)
Using rspec-rails (2.5.0)
Using webrat (0.7.1)
Using will_paginate (3.0.3)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.

C:\documents\projects\AJP\app>git st
# On branch master
nothing to commit (working directory clean)

C:\documents\projects\AJP\app>git ls-files
.gitignore
.settings/org.eclipse.core.resources.prefs
Gemfile
Gemfile.lock
README
...

已经运行了bundle installbundle update。另请注意,GemfileGemfile.lock文件在提交的文件中。

但是之后:

C:\documents\projects\AJP\app>git push heroku master
Enter passphrase for key '/c/Users/AJames/.ssh/id_rsa':
Counting objects: 46, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (31/31), done.
Writing objects: 100% (31/31), 4.46 KiB, done.
Total 31 (delta 24), reused 0 (delta 0)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
       Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
       Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
       Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
       Unresolved dependencies detected; Installing...
       Using --without development:test
       Windows Gemfile.lock detected, ignoring it.
       You have modified your Gemfile in development but did not check
       the resulting snapshot (Gemfile.lock) into version control

       You have added to the Gemfile:
       * source: rubygems repository http://rubygems.org/
       * rails (= 3.0.7)
       * pg (= 0.11.0)
       * gravatar_image_tag (= 1.0.0.pre2)
       * will_paginate
       * rake (= 0.8.7)
       * jquery-rails
       * nested_form
       * acts-as-taggable-on
       * rspec-rails (= 2.5.0)
       * annotate (= 2.4.0)
       * faker (= 0.3.1)
       * rspec (= 2.5.0)
       * webrat (= 0.7.1)
       * factory_girl_rails (= 1.0)
       FAILED: http://devcenter.heroku.com/articles/bundler
 !     Heroku push rejected, failed to install gems via Bundler

To git@heroku.com:ajpxvb.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:ajpxvb.git'

请问有什么想法吗?谢谢。

4

1 回答 1

2

我在 Heroku 输出中注意到的一件事是:“检测到 Windows Gemfile.lock,忽略它。”

我阅读了关于 Bundler 的 Heroku 开发中心文章,其中提到了以下内容:Gemfile.lock

如果 Gemfile 的平台部分包含 Windows 条目,例如 mswin 或 mingw,则 Gemfile.lock 文件将被忽略。

您的 Gemfile 是否偶然包含上述部分,如果是,如果您删除/注释掉平台部分(只是为了测试)会发生什么?

于 2012-05-30T16:25:09.520 回答