简体   繁体   中英

How can I fix Error loading RubyGems plugin?

I am new to coding, RoR and this site. 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. So I uninstalled it following several websites and waited for the book Railsspace because I wanted to learn RoR and the total package.

So last night I installed it, did some chapters, and noticed that I needed mysql to follow the tutorial. So tried to get that installed rather then sqlite3 or something. 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 e /Library/Ruby/Gems/1.8 directory.

I'd suggest you do not install ruby gems using sudo (there is no need). If you can, use rbenv or rvm to manage your rubies, and never use sudo.

I assume from the link that you're on 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. You may also need to do the same for launchy (nifty 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

Also you can check your sudoers file for any errors.

Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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