2017-04-03 78 views
0

我正在嘗試構建cli紅寶石寶石。一切都準備好了,只需要發佈它。發佈gem https://rubygems.org

首先我想這一點,

Enter your RubyGems.org credentials.                                
Don't have an account yet? Create one at https://rubygems.org/sign_up                        
    Email: [email protected]                                 
Password:                                       

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

,並得到了一個錯誤,所以做了一些研究之後,我才知道,我需要做的寶石第一,

所以做這個..

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 

但是,仍然出現錯誤,我錯過了什麼?我應該怎麼做才能解決「錯誤:Gemspec文件未找到:popular_deals-0.1.0.gem」錯誤?我確實有「popular_deals.gemspec」

非常感謝您的幫助!

+0

你可以去你的寶石的主目錄,運行'ls -R'並在你的問題中發佈結果嗎?我需要看到你的文件夾結構,所以我可以幫你弄清楚什麼是錯的。 – eiko

+0

@eiko ..非常感謝你試圖幫助我。但是這個問題解決了。這是我需要用我的gemspec文件構建gem。所以,命令gem build pupular_deals.gemspec工作!再次,非常感謝! –

+0

沒問題,很高興聽到你想出它c: – eiko

回答

1

此問題已解決。這是我的錯,我需要用我的gemspec文件構建gem。所以,命令gem build pupular_deals.gemspec工作!

+0

是的,它是'.gemspec' - >'.gem',所以你不能建立'.gem'。這就是*建立的。他們應該真的添加一條消息來處理這個案例,因爲它可能會讓人困惑。 – tadman