Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.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 bundle安装工作正常,但bundle show出现错误;rails.git尚未签出。请运行“bundle install”;_Ruby On Rails_Github_Gem_Bundler - Fatal编程技术网

Ruby on rails bundle安装工作正常,但bundle show出现错误;rails.git尚未签出。请运行“bundle install”;

Ruby on rails bundle安装工作正常,但bundle show出现错误;rails.git尚未签出。请运行“bundle install”;,ruby-on-rails,github,gem,bundler,Ruby On Rails,Github,Gem,Bundler,我最近更新了我们的Gemfile,在我们的github帐户上使用了一个分叉拷贝rails。我们已经在2.3-stable分支上创建了一个自定义分支(我将其称为错误修复分支),并为每个gems添加了gemspec,以使bundler能够找到它们 我的文件包含以下内容: git 'git://github.com/ourgithub/rails.git', :branch => "the_bugfix_branch" do # Note: load-order is essential

我最近更新了我们的Gemfile,在我们的github帐户上使用了一个分叉拷贝rails。我们已经在2.3-stable分支上创建了一个自定义分支(我将其称为
错误修复分支
),并为每个gems添加了gemspec,以使bundler能够找到它们

我的文件包含以下内容:

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
end
bundle安装
运行得很愉快,给了我(在所有其他gem输出中):

然后我签入并提交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安装--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
”。。。我显然已经做到了。他们也倾向于捆绑安装在生产中失败,但mine在开发中也以这种方式失败

我认为这不是一个简单的Gemfile/Gemfile.lock不匹配问题

一些google结果告诉我尝试删除.bundle/config并再次运行它。我也试过同样的效果

具体地说,在重新运行bundle安装之前,我阅读了本故障排除指南的所有
rm-rf

错误消息中没有更改

有什么想法吗?

塔林·伊斯特说:

我认为这不是一个简单的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
bundler一方面与版本号混淆,另一方面与分支混淆

明确地为每个列出的gem设置分支,似乎终于做到了

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
bundler一方面与版本号混淆,另一方面与分支混淆

明确地为每个列出的gem设置分支,似乎终于做到了