我无法使用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
Gemfile: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
答案 0 :(得分:1)
除非您展示Gemfile
,否则无法确定,但您要求的宝石似乎是sys-proctable-0.9.2
而不是sys-proctable
,
在安装之前,您需要使用bundle config build.sys-proctable --platform univeral-linux
才能获得所需的响应,但宝石名称为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'
答案 1 :(得分:0)
尝试运行rm Gemfile.lock
,然后运行bundle install
。
Gemfile中的gem应如下所示:
gem 'sys-proctable', :git => 'git://github.com/djberg96/sys-proctable.git'
额外帮助:
当我尝试迁移到jRuby时,我遇到了这个问题。如果您也这样做,并且部署到Heroku,也可以进行以下编辑:
在你的Gemfile中删除sqlite3
gem和pg
gem。用以下内容替换它们:
gem 'activerecord-jdbcsqlite3-adapter'
gem 'activerecord-jdbcpostgresql-adapter'