0

我正在阅读本手册,当我尝试部署我的第一个应用程序时,git 说:

-----> 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.3)
       * sqlite3 (= 1.3.3)
       FAILED: http://devcenter.heroku.com/articles/bundler
 !     Heroku push rejected, failed to install gems via Bundler

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

有什么解决办法吗?

4

1 回答 1

1

不幸的是,您不能从 Windows Rails 安装很好地部署到 Heroku。

它告诉您在说它忽略文件后您没有立即提交该文件,所以您要回答的真正问题是“为什么 Heroku 不接受我的 Windows Gemfile.lock 文件?”。基于此,我会取出“检测到 Windows Gemfile.lock;忽略它”并将其粘贴到谷歌或 Stack Overflow 中。

那会引导你到之前的 SO 答案: 为什么 Heroku 在 Windows 中不接受我的 Gemfile.lock?

于 2012-04-08T01:16:37.690 回答