2013-02-21 29 views
1

Capistrano的示數是從這個命令Capistrano的Ruby的安全錯誤

* executing "cd -- /home/root/apps/case/releases/20130221234114 && bundle exec 
rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- 
/home/root/apps/case/shared/assets/manifest.yml 
/home/root/apps/case/releases/20130221234114/assets_manifest.yml" 

,我得到這個響應後

** [out :: 108.60.137.195] ruby 
** [out :: 108.60.137.195] : 
** [out :: 108.60.137.195] no -I allowed while running setgid 
** [out :: 108.60.137.195] (
** [out :: 108.60.137.195] SecurityError 
** [out :: 108.60.137.195]) 

似乎無法找到相關的,除了一對夫婦的問題與任何Ruby在macports上編譯。我在Debian 6上使用rbenv和Ruby 1.9.3-p385。

回答

1

是rbenv共享(系統範​​圍)安裝嗎?舊的指令(從現在開始,從wiki中刪除,但可以在https://github.com/sstephenson/rbenv/wiki/Shared-install-of-rbenv/a86ef2e6b12254eeb7cecfd3bd878cf7382d1b4a訪問)建議在Ruby解釋器上設置SGID權限位,這會觸發安全警告(並有充分的理由)。

當前rbenv文檔建議安裝項目本地安裝(https://github.com/sstephenson/rbenv/wiki/Deploying-with-rbenv)。或者,它可以使用不帶SGID的系統範圍安裝,並使用bundler的--deployment標誌,以便它不會嘗試寫入系統範圍的目錄。