gem命令默默无闻

时间:2014-05-12 10:46:19

标签: ruby linux gem

我需要使用Twitter的twurl命令。这样我就在Linux下安装了Ruby,然后安装了Gem。

我已经下载了最新版本的twurl,但是当我尝试使用它进行安装时,它默默无效。我也尝试过安装oauth gem,但效果相同。 Gem必须工作,因为我可以使用gemspec文件进行构建,并创建一个gem文件。

cam:~/twurl-master$ sudo gem build twurl.gemspec
sh: git: command not found
/usr/local/lib/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:55: command not found: git ls-files
sh: git: command not found
WARNING:  description and summary are identical
WARNING:  See http://guides.rubygems.org/specification-reference/ for help
  Successfully built RubyGem
  Name: twurl
  Version: 0.9.2
  File: twurl-0.9.2.gem

cam:~/twurl-master$ ls
COPYING  Gemfile  INSTALL  README  Rakefile  bin  lib  test  twurl-0.9.2.gem  twurl.gemspec
cam:~/twurl-master$ sudo gem install twurl
cam:~/twurl-master$ sudo gem install twurl --remote
cam:~/twurl-master$ sudo gem list t

*** LOCAL GEMS ***


cam:~/twurl-master$ sudo gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.2
  - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /usr/bin
  - SPEC CACHE DIRECTORY: /home/cam/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /home/cam/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/sbin
     - /usr/local/bin
     - /usr/sbin
     - /usr/bin
     - /sbin
     - /bin
     - /usr/X11R6/bin
cam:~/twurl-master$

我不知道该怎么做。我在谷歌搜索过,但似乎没有其他人有这个特殊问题。没有错误消息非常无益......

1 个答案:

答案 0 :(得分:0)

我不确定是什么问题,如果这是相关的,但为了以防万一,twurl gem也需要gem oauth-0.4.7。