orta / cocoapods-keys

A key value store for storing per-developer environment and application keys
MIT License
1.55k stars 92 forks source link

problem with install cocapods-key - bad path, maybe #147

Open Heroex opened 8 years ago

Heroex commented 8 years ago

Hello,

i have a problem with install cocoapods-keys. If i use sudo gem install cocoapods-keys, so path /Library/Ruby/*****/2.0.0/ is without cocoapods-keys.

Terminal print out: Successfully installed cocoapods-keys-1.7.0 Parsing documentation for cocoapods-keys-1.7.0 Done installing documentation for cocoapods-keys after 0 seconds 1 gem installed

But pod install print:

Error loading the plugin cocoapods-keys-1.7.0.

LoadError - cannot load such file -- /usr/local/lib/ruby/gems/2.3.0/gems/cocoapods-keys-1.7.0/lib/cocoapods_plugin.rb /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require' /usr/local/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command/plugin_manager.rb:95:in block in safe_activate_and_require' /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command/plugin_manager.rb:95:ineach' /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command/plugin_manager.rb:95:in safe_activate_and_require' /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command/plugin_manager.rb:31:inblock in load_plugins' /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command/plugin_manager.rb:30:in `map' /usr/local/lib/ruby/gems/2.3.0/gems/claide-1.0.0/lib/claide/command/

This path is different than i found.

Any advices, please?

Thank you

loudmouth commented 7 years ago

Hey @Heroex I wonder if you have the same issue I just ran into. I got put on the right track via CocoaPods issue #5814

My understanding from that issue is that your Ruby installed at /usr/local is taking precendence. You should install your gems, including cocoapods, cocoapods-plugins and cocoapods-keys without sudo

If you are unable to do this, then you should

chown -R username:group ~/.gem

Where of course username is your username and group is your user's group (in OSX you can see your groupname by navigating to System Preferences > Users & Groups, unlock to make changes and Option + click on your user to see "Advanced Options". The group should be displayed in the newly displayed window).

After you chown you should be able to install all gems without sudo and hopefully things will behave.

vitalii-tym commented 7 years ago

I also had this issue. To install without sudo it was enough to do "$ gem install cocoapods-keys --user-install". Everything works now. Probably makes sense mentioning it in the Installation section of the Readme.