简体   繁体   English

如何修复错误加载RubyGems插件?

[英]How can I fix Error loading RubyGems plugin?

I am new to coding, RoR and this site. 我是编码,RoR和此站点的新手。 I installed RoR earlier following - http://eddorre.com/posts/rails-ultimate-install-guide-on-os-x-lion-using-rvm-homebrew-and-pow All was perfect earlier last week. 我在以下早期安装了RoR- http: //eddorre.com/posts/rails-ultimate-install-guide-on-os-x-lion-using-rvm-homebrew-pow在上周初,一切都很完美。 So I uninstalled it following several websites and waited for the book Railsspace because I wanted to learn RoR and the total package. 所以我在几个网站上卸载了它,并等待着Railsspace这本书,因为我想学习RoR和整个软件包。

So last night I installed it, did some chapters, and noticed that I needed mysql to follow the tutorial. 所以昨晚我安装了它,做了一些章节,并且注意到我需要mysql来遵循本教程。 So tried to get that installed rather then sqlite3 or something. 因此,尝试安装该软件,而不是sqlite3之类的东西。 And here is where the issues started. 这是问题开始的地方。 And after reinstalling and more other fiddling, this is the result I am stuck with following the installation guide provided above. 在重新安装和进行其他修改之后,这就是我坚持遵循上面提供的安装指南的结果。

$ sudo gem install bundler 

Error loading RubyGems plugin "/Library/Ruby/Gems/1.8/gems/open_gem-1.4.2/lib/rubygems_plugin.rb": Could not find launchy (~> 0.3.5) amongst [abstract-1.0.0, actionmailer-3.0.10, actionpack-3.0.10, activemodel-3.0.10, activerecord-3.0.10, activeresource-3.0.10, activesupport-3.0.10, addressable-2.2.6, arel-2.2.1, builder-3.0.0, bundler-1.0.18, capistrano-2.8.0, capistrano-ext-1.2.1, colored-1.2, configuration-1.3.1, erubis-2.7.0, git_remote_branch-0.3.0, heroku-2.5.2, highline-1.6.2, i18n-0.6.0, launchy-2.0.5, mail-2.3.0, mime-types-1.16, mysql-2.8.1, net-scp-1.0.4, net-sftp-2.0.5, net-ssh-2.2.1, net-ssh-gateway-1.1.0, open_gem-1.4.2, polyglot-0.3.2, powder-0.1.6, rack-1.3.2, rack-mount-0.8.2, rack-test-0.6.1, railties-3.0.10, rake-0.9.2, rdoc-3.9.4, rest-client-1.6.7, rubygems-update-1.8.10, sqlite3-1.3.4, term-ansicolor-1.0.6, thor-0.14.6, treetop-1.4.10, tzinfo-0.3.29] (Gem::LoadError) ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into th 加载RubyGems插件“ /Library/Ruby/Gems/1.8/gems/open_gem-1.4.2/lib/rubygems_plugin.rb”时出错:在[abstract-1.0.0,actionmailer- 3.0.10,actionpack-3.0.10,activemodel-3.0.10,activerecord-3.0.10,activeresource-3.0.10,activesupport-3.0.10,可寻址2.2.6,arel-2.2.1,builder-3.0。 0,bundler-1.0.18,capistrano-2.8.0,capistrano-ext-1.2.1,有色1.2,配置1.3.1,erubis-2.7.0,git_remote_branch-0.3.0,heroku-2.5.2, highline-1.6.2,i18n-0.6.0,launchy-2.0.5,mail-2.3.0,mime-types-1.16,mysql-2.8.1,net-scp-1.0.4,net-sftp-2.0。 5,net-ssh-2.2.1,net-ssh-gateway-1.1.0,open_gem-1.4.2,polyglot-0.3.2,powder-0.1.6,rack-1.3.2,rack-mount-0.8。 2,rack-test-0.6.1,railties-3.0.10,rake-0.9.2,rdoc-3.9.4,rest-client-1.6.7,rubygems-update-1.8.10,sqlite3-1.3.4, term-ansicolor-1.0.6,thor-0.14.6,treetop-1.4.10,tzinfo-0.3.29](Gem :: LoadError)错误:执行gem时...(Gem :: FilePermissionError)您没有拥有写权限 e /Library/Ruby/Gems/1.8 directory. /Library/Ruby/Gems/1.8目录。

I'd suggest you do not install ruby gems using sudo (there is no need). 我建议您不要使用sudo安装ruby gems(没有必要)。 If you can, use rbenv or rvm to manage your rubies, and never use sudo. 如果可以,请使用rbenv或rvm来管理您的红宝石,切勿使用sudo。

I assume from the link that you're on Mac OS X? 我从链接中假设您使用的是Mac OS X?

You need to type 您需要输入

sudo gem install bundler

sudo will let the program have the necessary permissions for writing into the directory. sudo将使程序具有写入目录的必要权限。 You may also need to do the same for launchy (nifty gem). 您可能还需要对启动(漂亮的gem)执行相同的操作。

From the top view its a permission issue. 从顶视图看,这是一个权限问题。 Why don't you try to uninstall everything and install everything again? 您为什么不尝试卸载所有内容并重新安装所有内容? I know its not the best solution but might just work ! 我知道这不是最好的解决方案,但可能会起作用! You can follow the following guide(not tested by me) http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac 您可以遵循以下指南(未经我测试): http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac

Also you can check your sudoers file for any errors. 您也可以检查sudoers文件是否存在任何错误。

Hope it helps 希望能帮助到你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM