rom*_*man 14 ruby git production ruby-on-rails heroku
我有以下问题:
我正在尝试在heroku上部署我的项目,但是在我运行之后
git push heroku master
Run Code Online (Sandbox Code Playgroud)
我得到以下内容:
git push heroku master -f
Counting objects: 524, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (498/498), done.
Writing objects: 100% (524/524), 157.76 KiB, done.
Total 524 (delta 207), reused 62 (delta 2)
-----> Heroku receiving push
-----> Ruby/Rails app detected
!
! Gemfile.lock is required. Please run "bundle install" locally
! and commit your Gemfile.lock.
!
! Heroku push rejected, failed to compile Ruby/rails app
To git@heroku.com:*****.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:*****.git'
Run Code Online (Sandbox Code Playgroud)
我已经运行bundle install和bundle update几次,我试图删除Gemfile.lock从资源库中,并从我的文件系统.但我仍然得到同样的信息.谁能告诉我我做错了什么?
我想要推送的分支是从主人那里克隆出来的.
AMI*_*ING 22
一些事情
bundle install本地提示操作即可.git add . 或者您只能添加Gemfile.lock git add Gemfile.lock现在git push heroku应该这样做.
小智 6
在您的开发机器上运行
rm -rf .bundle && bundle install && git add Gemfile.lock && git commit -m "Added Gemfile.lock"
然后部署.
很可能你的Gemfile.lock没有提交到你的存储库.使用git st并确保提交Gemfile.lock; 检查你的.gitignore文件,确保你不会无意中忽略它.
| 归档时间: |
|
| 查看次数: |
12011 次 |
| 最近记录: |