0

I am trying to build a cli ruby gem. Everything is ready, just need to publish it.

First I tried this,

Enter your RubyGems.org credentials.                                                                                                                               
Don't have an account yet? Create one at https://rubygems.org/sign_up                                                                                              
   Email:   hima.chhag@gmail.com                                                                                                                                   
Password:                                                                                                                                                          

Signed in.                                                                                                                                                         
ERROR:  While executing gem ... (Gem::Package::FormatError)                                                                                                        
    No such file or directory @ rb_sysopen - popular_deals-0.1.0.gem

and got an error, so after doing some research I got to know that I need to make gem first,

So did this ..

 gem build popular_deals-0.1.0.gem                                                                                                                             
ERROR:  Gemspec file not found: popular_deals-0.1.0.gem                                                                                                            
[19:14:21] (master) popular-deals-from-slickdeals.net-cli

But, still getting errors, am I missing anything? what should I do to solve " ERROR: Gemspec file not found: popular_deals-0.1.0.gem " error? I do have "popular_deals.gemspec"

Thank you so much for your help!

Hima Chhag
  • 401
  • 7
  • 22
  • can you go to your gem's main directory, run `ls -R` and post the results in your question? i need to see your folder structure so i can help you figure out what's wrong. – eiko Apr 03 '17 at 19:29
  • @eiko.. Thank you so much for trying to help me. But this problem is solved. It was my I need to build gem with my gemspec file. So, the command gem build pupular_deals.gemspec worked! Again, thanks a lot! – Hima Chhag Apr 03 '17 at 19:35
  • no problem, glad to hear you figured it out c: – eiko Apr 03 '17 at 20:07

1 Answers1

1

This problem is solved. It was my fault, I needed to build gem with my gemspec file. So, the command gem build pupular_deals.gemspec worked!

Hima Chhag
  • 401
  • 7
  • 22
  • Yeah, it's `.gemspec` -> `.gem`, so you can't build a `.gem`. That's what *is* built. They should really add a message to handle this case as it can be confusing. – tadman Apr 03 '17 at 20:54