3

我无法使用 bundle 安装 sys-proctable。即使安装了它也不会停止抱怨:

$ gem install sys-proctable --platform universal-linux
Fetching: sys-proctable-0.9.2-universal-linux.gem (100%)
Successfully installed sys-proctable-0.9.2-universal-linux
1 gem installed

$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Could not find sys-proctable-0.9.2 in any of the sources

$ bundle install --platform universal-linux
Unknown switches '--platform'

$ bundle config build.sys-proctable --platform univeral-linux

$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Could not find sys-proctable-0.9.2 in any of the sources

$ bundle install --without production
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Could not find sys-proctable-0.9.2 in any of the sources

$ grep proctable Gemfile

$  rails console
You have requested:
  pg = 0.12.2

The bundle currently has pg locked at 0.12.2.
Try running `bundle update pg`
Run `bundle install` to install missing gems.

$ uname -a
CYGWIN_NT-5.1 dumbopc 1.7.17(0.262/5/3) 2012-10-19 14:39 i686 Cygwin

宝石文件: http ://pastebin.com/Fre28yTp

gem list --local: http: //pastebin.com/yP0sbHF2

尝试添加gem 'sys-proctable', '~>0.9.2', :git => 'git://github.com/djberg96/sys-proctable.git'到 Gemfile,但没有奏效:

$ bundle install
Updating git://github.com/djberg96/sys-proctable.git
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Could not find gem 'sys-proctable (~> 0.9.2) ruby' in git://github.com/djberg96/sys-proctable.git (at master).
Source contains 'sys-proctable' at: 0.9.2
4

2 回答 2

1

除非您展示您的,否则无法确定,Gemfile但您要求的宝石似乎sys-proctable-0.9.2不是sys-proctable

确实,您需要bundle config build.sys-proctable --platform univeral-linux在安装之前使用才能获得所需的响应,但 gem 名称是sys-proctable.

编辑

在此问题https://github.com/djberg96/sys-proctable/issues/24之后,您似乎可以检查您是否真的需要它,irb如果可以,请使用它,关于您可以关注和需要的烦人消息它是来自本地目录或直接来自其git存储库的路径。

要么作为gem 'sys-proctable', :git => 'git://github.com/djberg96/sys-proctable.git'

或者

gem 'sys-proctable', :path => 'path/to/gem/inside/project'

于 2013-02-25T20:58:33.363 回答
0

尝试运行rm Gemfile.lock然后运行bundle install

Gemfile 中的 gem 应该如下所示: gem 'sys-proctable', :git => 'git://github.com/djberg96/sys-proctable.git'

额外帮助:

当我尝试迁移到 jRuby 时遇到了这个问题。如果你做了同样的事情,并且你部署到 Heroku,也进行这些编辑:

在您的 Gemfile 中删除sqlite3gem 和pggem。用这些替换它们:

gem 'activerecord-jdbcsqlite3-adapter'
gem 'activerecord-jdbcpostgresql-adapter'

于 2013-03-11T16:41:37.720 回答