radar / guides

Guides for Ruby and Elixir and whatever else I feel like
1.52k stars 164 forks source link

Too Many Gems... #31

Closed Merovex closed 9 years ago

Merovex commented 11 years ago

When I run gem bump, everything is fine. When I run gem release, I get

ERROR:  While executing gem ... (Gem::CommandLineError)
    Too many gem names (/usr/local/bin, /usr/local/bin); please specify only one

Assistance?

psychocandy commented 11 years ago

Weird error... Could you please run which gem and then echo $PATH and show us the output of both commands?

Merovex commented 11 years ago

The issue is RVM's use of .rvmrc. I'm not at that computer today to give the exact solution, but there is a reference in that file to /usr/local/bin which leads to the problem. When I get to that computer, I'll update my reply to include the fix.

On Wed, Apr 10, 2013 at 3:45 AM, Amir F notifications@github.com wrote:

Weird error... Could you please run which gem and then echo $PATH and show us the output of both commands?

— Reply to this email directly or view it on GitHubhttps://github.com/radar/guides/issues/31#issuecomment-16159914 .

Ben Wilson "A belief, no matter how sincere, if not reflected in reality isn’t a belief; it’s a delusion."

ghost commented 11 years ago

Could you detail how it’s RVM’s fault?

There are two ways to generate an RVM rvmrc file. rvm rvmrc create and echo “rvm use –install –create 1.9.3-p392 (or similar construct). RVM doesn’t hardwire paths. It uses vars like $rvm_path and builds on them in order to create the rvmrc file.

If you have a hardwired path in there, then a human added that.

From: Merovex [mailto:notifications@github.com] Sent: Wednesday, April 10, 2013 5:05 AM To: radar/guides Subject: Re: [guides] Too Many Gems... (#31)

The issue is RVM's use of .rvmrc. I'm not at that computer today to give the exact solution, but there is a reference in that file to /usr/local/bin which leads to the problem. When I get to that computer, I'll update my reply to include the fix.

On Wed, Apr 10, 2013 at 3:45 AM, Amir F notifications@github.com wrote:

Weird error... Could you please run which gem and then echo $PATH and show us the output of both commands?

— Reply to this email directly or view it on GitHubhttps://github.com/radar/guides/issues/31#issuecomment-16159914 .

Ben Wilson "A belief, no matter how sincere, if not reflected in reality isn’t a belief; it’s a delusion."

— Reply to this email directly or view it on GitHub https://github.com/radar/guides/issues/31#issuecomment-16162917 .

Merovex commented 11 years ago

Sorry, I misspoke. It was .gemrc that is the culprit:

   ---
   :sources:
   - http://rubygems.org/
   - http://gems.github.com
   gem: -n/usr/local/bin
   :backtrace: false
   :benchmark: false
   :verbose: true
   :update_sources: true
   :bulk_threshold: 1000