安装红宝石宝石

时间:2013-01-15 06:36:36

标签: ruby-on-rails ruby gem bundler

我正在尝试按照this tutorial

安装tabred ruby​​ gem

我陷入了一个循环:运行gem update => run gem =>捆绑安装。

有人可以提供一些有关如何进行的信息吗?我已经将gem添加到Gemfile。

以下是命令输出:

**22:16:35->gem update --system**
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.8.24
Updating RubyGems to 1.8.24
Installing RubyGems 1.8.24
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/commands/update_command.rb:153: warning: Insecure world writable dir /usr/local/git/bin/ in PATH, mode 040777
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /Library/Ruby/Site/1.8/gauntlet_rubygems.rb


**22:17:33->bundle install**
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
/Library/Ruby/Gems/1.8/gems/bundler-1.2.3/lib/bundler.rb:263: warning: Insecure world writable dir /usr/local/git/bin/ in PATH, mode 040777
Using rake (10.0.3) 
Using i18n (0.6.1) 
Using multi_json (1.5.0) 
Using activesupport (3.2.11) 
Using actionpack (3.2.11) 
Using sass-rails (3.2.6) 
Using sqlite3 (1.3.7) 
Installing tabulous (1.3.0) 
Gem::InstallError: tabulous requires RubyGems version >= 1.3.7. Try 'gem update --system' to update RubyGems itself.
An error occurred while installing tabulous (1.3.0), and Bundler cannot continue.
Make sure that `gem install tabulous -v '1.3.0'` succeeds before bundling.


22:18:03->gem install tabulous -v '1.3.0
> `
> '
ERROR:  While executing gem ... (ArgumentError)
    Illformed requirement ["1.3.0\n`\n"]

**22:18:39->gem install tabulous -v 1.3.0**
ERROR:  Error installing tabulous:
    tabulous requires RubyGems version >= 1.3.7. Try 'gem update --system' to update RubyGems itself.

22:26:25->gem update --system
Updating RubyGems
Updating rubygems-update
Successfully installed rubygems-update-1.8.24
Updating RubyGems to 1.8.24
Installing RubyGems 1.8.24
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/commands/update_command.rb:153: warning: Insecure world writable dir /usr/local/git/bin/ in PATH, mode 040777
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /Library/Ruby/Site/1.8/gauntlet_rubygems.rb

1 个答案:

答案 0 :(得分:2)

试试

sudo gem update --system

编辑:我还建议你做Kasumi评论并使用rvm或rbenv。在本地安装Ruby on Rails之前,我有一段时间,直到我安装了rbenv。