我最近更新了我们的Gemfile,以便在我们的github帐户上使用分叉的复制rails。我们已经在2.3稳定的分支上创建了一个自定义分支(我将称之为the_bugfix_branch),并为每个宝石添加了宝石规格,以使它们可以通过bundler找到。
我的Gemfile有以下内容:
git 'git://github.com/ourgithub/rails.git', :branch => "the_bugfix_branch" do
# Note: load-order is essential for dependencies
gem 'activesupport', '2.3.2' # this must go first
gem 'actionpack', '2.3.2' # this must go second
gem 'actionmailer', '2.3.2'
gem 'activerecord', '2.3.2'
gem 'activeresource','2.3.2'
gem 'rails', '2.3.2' # this must go last
endbundle install很高兴地提供给我(在所有的gem输出中):
Using actionpack (2.3.2) from git://github.com/ourgithub/rails.git (at the_bugfix_branch)
Using actionmailer (2.3.2) from git://github.com/ourgithub/rails.git (at the_bugfix_branch)
Using activesupport (2.3.2) from git://github.com/ourgithub/rails.git (at the_bugfix_branch)
Using activerecord (2.3.2) from git://github.com/ourgithub/rails.git (at the_bugfix_branch)
Using activeresource (2.3.2) from git://github.com/ourgithub/rails.git (at the_bugfix_branch)
...
Using rails (2.3.2) from git://github.com/ourgithub/rails.git (at the_bugfix_branch)
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.然后我签入并提交包含以下内容的Gemfile.lock:
GIT
remote: git://github.com/ourgithub/rails.git
revision: 3fc562f9b1def3ad9a7abbfd5ccfa713a6dbc39f
branch: the_bugfix_branch
specs:
actionmailer (2.3.2)
actionpack (= 2.3.2)
actionpack (2.3.2)
actionpack (= 2.3.2)
activerecord (2.3.2)
activesupport (= 2.3.2)
activeresource (2.3.2)
activesupport (= 2.3.2)
activesupport (2.3.2)
rails (2.3.2)
actionmailer (= 2.3.2)
actionpack (= 2.3.2)
activerecord (= 2.3.2)
activeresource (= 2.3.2)
activesupport (= 2.3.2)
rake (>= 0.8.3)但是,如果我试图旋转服务器,它会告诉我:
The git source git://github.com/ourgithub/rails.git is not yet checked out. Please run `bundle install` before trying to start your application如果我尝试bundle show rails或bundle check,我也会得到完全相同的消息。
> bundle show rails
The git source git://github.com/ourgithub/rails.git is not yet checked out. Please run `bundle install` before trying to start your application
> bundle check
git://github.com/ourgithub/rails.git (at the_bugfix_branch) is not checked out. Please run `bundle install`如果我尝试bundle install --deployment (只是为了刺激),它会给出:
> bundle install --deployment
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have added to the Gemfile:
* source: git://github.com/ourgithub/rails.git (at the_bugfix_branch)
You have deleted from the Gemfile:
* source: git://github.com/ourgithub/rails.git (at the_bugfix_branch)
You have changed in the Gemfile:
* activeresource from `git://github.com/ourgithub/rails.git (at the_bugfix_branch)` to `no specified source`
* activerecord from `git://github.com/ourgithub/rails.git (at the_bugfix_branch)` to `no specified source`
* actionmailer from `git://github.com/ourgithub/rails.git (at the_bugfix_branch)` to `no specified source`
* actionpack from `git://github.com/ourgithub/rails.git (at the_bugfix_branch)` to `no specified source`
* activesupport from `git://github.com/ourgithub/rails.git (at the_bugfix_branch)` to `no specified source`
* rails from `git://github.com/ourgithub/rails.git (at the_bugfix_branch)` to `no specified source`显然,我不仅更改了我的Gemfile,而且自从我将这个东西添加到Gemfile之后,我肯定已经运行了bundle安装。
我在谷歌上搜索过“还没有签出。请在尝试启动应用程序之前运行bundle install”,所有的"__bundle install将无法工作“的问题,我可以找到似乎是”运行bundle install,然后签入您的副本Gemfile.lock__“.显然我已经做过了。他们也倾向于捆绑安装失败的生产,但我的方式也失败了在开发。
我不认为这是简单的 Gemfile/Gemfile.lock错配问题!
google的一些结果告诉我尝试删除. .bundle/config并再次运行它。我试过同样的效果。
具体来说,我浏览了这个疑难解答指南的所有rm -rf行:重新运行包安装之前的https://github.com/carlhuda/bundler/blob/master/ISSUES.md。
错误消息没有更改。
有什么想法吗?
发布于 2013-01-22 01:29:05
Taryn East说:
我不认为这是简单的 Gemfile/Gemfile.lock错配问题!
结果我错了。
解决方案是删除Gemfile中的版本号,并显式地使用分支:
git 'git://github.com/ourgithub/rails.git', :branch => "the_bugfix_branch" do
# Note: load-order is essential for dependencies
gem 'activesupport', :branch => "the_bugfix_branch" # this must go first
gem 'actionpack', :branch => "the_bugfix_branch" # this must go second
gem 'actionmailer', :branch => "the_bugfix_branch"
gem 'activerecord', :branch => "the_bugfix_branch"
gem 'activeresource',:branch => "the_bugfix_branch"
gem 'rails', :branch => "the_bugfix_branch" # this must go last
end邦德勒一边被版本号搞混了,一边又把树枝弄糊涂了。
明确设置每个创业板上市的分支,似乎终于做到了!
https://stackoverflow.com/questions/14448902
复制相似问题