我試圖建立我的第一個紅寶石寶石,似乎一切順利,直到我試圖安裝寶石。我正在使用RVM,因此不需要'sudo gem install'。如何解決安裝定製內置gem的權限錯誤?
首先,我試圖做到以下幾點:
jim:~/Desktop/spectest \ [git:master]
→ rake manifest
(in /Users/jim/Desktop/spectest)
Cleaning
- pkg
rm -rf pkg
Building Manifest
Manifest
README
Rakefile
bin/buildcss
...
jim:~/Desktop/spectest \ [git:master]
→ rake install
(in /Users/jim/Desktop/spectest)
Cleaning
Gemspec generated
mkdir -p pkg
mkdir -p pkg/css-reader-0.1.0
rm -f pkg/css-reader-0.1.0/Manifest
...
cd pkg
tar zcvf css-reader-0.1.0.tar.gz css-reader-0.1.0
a css-reader-0.1.0
a css-reader-0.1.0/bin
...
cd -
WARNING: description and summary are identical
Successfully built RubyGem
Name: css-reader
Version: 0.1.0
File: css-reader-0.1.0.gem
mv css-reader-0.1.0.gem pkg/css-reader-0.1.0.gem
Private key not found; gem will not be signed.
Targeting "ruby" platform.
Password:
Sorry, try again.
Password:
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d css-reader`
Successfully installed css-reader-0.1.0
1 gem installed
Installing ri documentation for css-reader-0.1.0...
Updating class cache with 3288 classes...
Installing RDoc documentation for css-reader-0.1.0...
好了 - 所以我還不能確定,爲什麼我得到了寶石:: InstallError這裏。有沒有日誌紅寶石寶石不斷,我可以找到有關錯誤的更多細節?無論哪種方式,我試圖直接嘗試安裝.gem包:
gem install pkg/css-reader-0.1.0.gem
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/jim/.rvm/gems/ruby-1.9.2-preview1/gems/css-reader-0.1.0/Manifest
而且我得到了更多的反饋。這次它看起來像Manifest文件的權限錯誤。所以我試圖修改777 Manifest文件並重復整個過程,但是我一直在收到錯誤。似乎代表了我的某個新手的錯誤。任何建議表示讚賞!
謝謝 - 看起來已經解決了! – 2010-02-17 14:04:26
非常感謝! – Vicer 2010-10-20 01:06:48
完全幫助我!謝謝! – Abel 2011-05-06 05:21:44