Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 由于未能安装gems,Heroku推送被拒绝_Ruby On Rails_Heroku_Bundler - Fatal编程技术网

Ruby on rails 由于未能安装gems,Heroku推送被拒绝

Ruby on rails 由于未能安装gems,Heroku推送被拒绝,ruby-on-rails,heroku,bundler,Ruby On Rails,Heroku,Bundler,已运行捆绑包安装和捆绑包更新。还要注意,Gemfile和Gemfile.lock文件位于提交的文件中 但是: 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) U

已运行
捆绑包安装
捆绑包更新
。还要注意,
Gemfile
Gemfile.lock
文件位于提交的文件中

但是:

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
...

有什么想法吗?谢谢。

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

我读了一篇关于Gemfile.lock的文章

如果Gemfile的platforms部分包含Windows条目,如mswin或mingw,那么Gemfile.lock文件将被忽略


您的GEM文件是否碰巧包含上述部分?如果是,如果删除/注释掉平台部分(只是为了测试),会发生什么情况?

Craig干杯。这让我思考,我想这解决了它:甜蜜!很高兴你把它整理好了!
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'