我之前搞砸了我的导轨安装,所以我需要帮助重新安装它/修复它。这是错误。
gem install rails -v 4.1.1
Error loading RubyGems plugin "/usr/local/rvm/gems/ruby-2.1.2@global/gems/executable-hooks-1.3.2/lib/rubygems_plugin.rb": Permission denied @ dir_s_mkdir - /usr/local/rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0 (Errno::EACCES)
Error loading RubyGems plugin "/usr/local/rvm/gems/ruby-2.1.2/gems/gem-wrappers-1.2.7/lib/rubygems_plugin.rb": Permission denied @ dir_s_mkdir - /usr/local/rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0 (Errno::EACCES)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/rvm/gems/ruby-2.1.2 directory.
$ echo $GEM_HOME
/usr/local/rvm/gems/ruby-2.1.2
$ echo $GEM_PATH
/usr/local/rvm/gems/ruby-2.1.2:/usr/local/rvm/gems/ruby-2.1.2@global
$ echo $PATH
/usr/local/rvm/gems/ruby-2.1.2/bin:/usr/local/rvm/gems/ruby-2.1.2@global/bin:/usr/local/rvm/rubies/ruby-2.1.2/bin:/usr/local/rvm/bin:/usr/local/bin:/usr/local/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/ImageMagick/bin:/opt/local/bin:/opt/local/sbin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/Users/at/bin:/Users/Digital/Desktop/android:/usr/share/ant/bin:/Users/Digital/Desktop/android/sdk/platform-tool:/Users/Digital/Desktop/android/sdk/platform-tools:/Users/Digital/Desktop/android/sdk/tools:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/Users/at/bin:/Users/Digital/Desktop/android:/usr/share/ant/bin:/Users/Digital/Desktop/android/sdk/platform-tool:/Users/Digital/Desktop/android/sdk/platform-tools:/Users/Digital/Desktop/android/sdk/tools
$ echo $RUBY_VERSION
ruby-2.1.2
$ rvm use 2.1.2
Using /usr/local/rvm/gems/ruby-2.1.2
Warning! Executable 'ruby' missing, something went wrong with this ruby installation!
Warning! Executable 'gem' missing, something went wrong with this ruby installation!
Warning! Executable 'irb' missing, something went wrong with this ruby installation!
Error loading RubyGems plugin "/usr/local/rvm/gems/ruby-2.1.2@global/gems/executable-hooks-1.3.2/lib/rubygems_plugin.rb": Permission denied @ dir_s_mkdir - /usr/local/rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0 (Errno::EACCES)
Error loading RubyGems plugin "/usr/local/rvm/gems/ruby-2.1.2/gems/gem-wrappers-1.2.7/lib/rubygems_plugin.rb": Permission denied @ dir_s_mkdir - /usr/local/rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0 (Errno::EACCES)
答案 0 :(得分:1)
这似乎是全局安装的另一个RVM问题,不是吗?如何在您的主目录下安装?
https://rvm.io/rvm/install(参见"单用户安装位置:〜/ .rvm /")
另外,需要考虑的事项:
答案 1 :(得分:1)
好的,我通过卸载rvm
修复了它rvm implode
这将删除rvm /目录及其中构建的所有rubies。为了删除rvm的最终痕迹,您还需要删除rvm gem:
gem uninstall rvm