0

我正在尝试按照本教程安装 tabulous ruby​​ gem

我陷入了一个循环:运行 gem update => run gem => bundle install。

有人可以提供一些有关如何进行的信息吗?我已经将 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
4

1 回答 1

2

试用

sudo gem update --system

编辑:我还建议按照 Kasumi 评论的方式使用 rvm 或 rbenv。在我安装了 rbenv 之前,我在本地安装 Ruby on Rails 时度过了一段地狱般的时光。

于 2013-01-15T06:41:38.917 回答