我不知何故把我的$ PATH搞砸了。 (改變它)和我的紅寶石和鐵軌寶石不工作。我努力解決這個問題的方法是重新安裝RVM。現在我的紅寶石在碼頭工作良好。 在運行gem install rails
我得到迎接這樣的:gem install rails錯誤:執行gem時(Errno :: EACCES)
Permission denied - /Users/emKaro/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.13/test/test_atomic.rb
當我試圖通過sudo gem install rails
安裝導軌,我得到這個錯誤:
ERROR: While executing gem ... (Errno::EACCES)
我有安裝命令行工具安裝的XCode以及。即使繼續安裝GCC,但在嘗試安裝導軌時遇到同樣的錯誤。
這是完全錯誤信息
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/emKaro/.rvm/gems/ruby-2.0.0-p247/gems/atomic-1.1.13/test/test_atomic.rb
emmanuels-imac:~ siaW$ sudo gem install rails
Password:
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/emKaro/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/emKaro/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
--with-atomic_reference-dir
--without-atomic_reference-dir
--with-atomic_reference-include
--without-atomic_reference-include=${atomic_reference-dir}/include
--with-atomic_reference-lib
--without-atomic_reference-lib=${atomic_reference-dir}/
/Users/emKaro/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /Users/emKaro/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
from /Users/emKaro/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:817:in `try_run'
from extconf.rb:24:in `<main>'
Gem files will remain installed in /Users/emKaro/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/atomic-1.1.13 for inspection.
Results logged to /Users/emKaro/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0/gems/atomic-1.1.13/ext/gem_make.out
我的我的電腦管理和運行Mac OS 10.8.3。我會感謝一些幫助安裝軌道。
編輯: 感謝@Christoph ,幫助是實際上 sudo rm -rf ~/.rvm/
我想只有UNINSTAL刪除RVM文件夾,它沒有工作的唯一代碼。因此,刪除該文件夾,然後重新安裝RVM即可完成這項工作。
你爲什麼要安裝寶石?無論如何,你是否安裝了XCode命令行工具? –
是的,我安裝了命令行工具。 – siaw23