使用heroku部署的Gemfile出错

时间:2012-04-08 01:07:24

标签: ruby-on-rails heroku gemfile

我正在阅读this manual,当我尝试部署我的第一个应用时,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'

任何解决方案?

1 个答案:

答案 0 :(得分:1)

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

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

这会引导您回到之前的答案:Why won't Heroku accept my Gemfile.lock in Windows?