2012-05-17 114 views
9

我收到了這個問題。我認爲安裝了bundler。而且由於我無法在RoR中創建應用程序時進行捆綁安裝,也無法在項目中捆綁安裝直接安裝。 如果您有任何問題並找到解決方案,請幫助我。捆綁安裝不能脫機工作

enter code here  :run bundle install 
:Fetching gem metadata from https://rubygems.org/. 
:Error Bundler::HTTPError during request to dependency API 
:Fetching full source index from https://rubygems.org/ 
:Could not reach https://rubygems.org/ 

回答

2

您將需要連接到網絡,這樣捆綁可以與您有最新的寶石RubyGems的檢查並在必要時進行下載。

+0

嗨, 它最初在Ubuntu下離線工作。我使用Aptana IDE,我想我已經安裝了捆綁軟件,或嘗試過使用Spree CMS進行配置,而離線捆綁軟件安裝不起作用。但現在,即使我的窗戶,Aptana IDE也有同樣的問題。 運行軟件包安裝 從https://rubygems.org/獲取gem元數據。 錯誤 捆紮機:: HTTPError請求期間從 https://rubygems.org/ 網絡錯誤相關API 擷取完整的源索引擷取 https://rubygems.org/quick/Marshal.4.8/sqlite3-1.3 .6.gemspec.rz 如果我犯了什麼錯誤,請幫助。 –

+0

即使不在線,我也可以捆綁安裝。 –

28

如果您安裝了寶石,則可以使用bundle install --local。它不需要互聯網連接

+0

感謝Caulfield。這真的起作用了。大!!真棒..我正在尋找這個結果.. –

+7

+1這應該是接受的答案 –

3

以下方法適用於我。

$ rails new blog -B # -B tells rails not to run bundle install 
cd blog 
$ bundle install --local 
Edit the GemFile and uncomment the line "therubyracer" 
$ rails server 
=> Booting WEBrick 
=> Rails 4.0.0 application starting in development on http://0.0.0.0:3000 
=> Run `rails server -h` for more startup options 
=> Ctrl-C to shutdown server 
[2013-09-28 19:09:35] INFO WEBrick 1.3.1 
[2013-09-28 19:09:35] INFO ruby 2.0.0 (2013-05-14) [i686-linux] 
[2013-09-28 19:09:35] INFO WEBrick::HTTPServer#start: pid=1635 port=3000