[英]ruby on rails gem file installation install bundle
我是紅寶石新手。 我已經在Ubuntu 14.04
rails 4.2上成功安裝了ruby,並創建了一個新的應用程序,但是當我啟動服務器時,可以通過編寫以下內容查看它是否在工作:
rails server
我收到此錯誤消息:
Could not find gem 'sass-rails (~> 5.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
當我開始安裝捆綁軟件時,我得到了需要在捆綁軟件之前安裝的其他軟件包。
bundle install
錯誤消息
Gem::RemoteFetcher::FetchError: Errno::EHOSTUNREACH: No route to host - connect(2) for "rubygems.global.ssl.fastly.net" port 443 (https://rubygems.org/gems/minitest-5.5.1.gem)
An error occurred while installing minitest (5.5.1), and Bundler cannot
continue.
Make sure that `gem install minitest -v '5.5.1'` succeeds before bundling.
然后在我安裝minitest並運行捆綁安裝后
我收到此錯誤消息
Gem::RemoteFetcher::FetchError: Errno::EHOSTUNREACH: No route to host - connect(2) for "rubygems.global.ssl.fastly.net" port 443 (https://rubygems.org/gems/debug_inspector-0.0.2.gem)
An error occurred while installing debug_inspector (0.0.2), and Bundler cannot
continue.
Make sure that `gem install debug_inspector -v '0.0.2'` succeeds before
bundling.
它不斷顯示我在捆綁之前需要安裝的軟件包。
我不在Ubuntu上,但是我發現在Rails 4+中,逐步安裝gem是規則,而不是例外。 使用bundle似乎無法很好地處理依賴項gem安裝。 對於每個“缺少”的依賴項gem,請運行單個gem安裝,然后再次捆綁以查看下一步。它可能會在每個步驟中顯示另一個依賴項,只需安裝該依賴項即可。 (警告是,如果您看到未在每個bundle exec上都安裝相同的gem,那么這完全是另一個問題。一旦您安裝了gem,它應該被鎖定並可用)
$gem install bundle
$gem install name-of-flagged-gem
$gem install bundle
$gem install next-missing-gem
希望這可以幫助。
您的解決方案應該在這里: SSL錯誤我有同樣的問題。 每次我執行“捆綁安裝”時,它都會告訴我確保“寶石安裝....在捆綁前成功”。當我按其說的去做時,它只是告訴我另一個寶石。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.