Share

Gem中mysql错误

Gem使用中遇到错误:

henry@henry-laptop:~/Soft/Ruby/RubyGem/rubygems-0.9.0$ sudo gem update --system     Updating RubyGems...
Bulk updating Gem source index for: http://gems.rubyforge.org
Attempting remote update of rubygems-update
ERROR:  While executing gem ... (Errno::ENOENT)
No such file or directory - getcwd
henry@henry-laptop:~/Soft/Ruby/RubyGem/rubygems-0.9.0$ sudo gem update rails
sudo: cannot get working directory
Updating installed gems...
Attempting remote update of rails
Install required dependency rake? [Yn]  y
ERROR:  While executing gem ... (Errno::ENOENT)
No such file or directory - getcwd
henry@henry-laptop:~/Soft/Ruby/RubyGem/rubygems-0.9.0$ cd ~
henry@henry-laptop:~$ sudo gem update --system

后面运行正常,看来Gem还会挑剔目录~