2013-10-14 80 views
-2

我正在學習RoR throgh Michael Hartl的書。第三章通過命令欄創建sample_app新sample_app --skip-unit-test我在運行bundle intstall後得到了這個。RoR導軌新命令無法正常工作

/usr/local/lib/ruby/1.9.1/net/http.rb:644:in `initialize': Connection timed out - connect(2) (Errno::ETIMEDOUT) 
    from /usr/local/lib/ruby/1.9.1/net/http.rb:644:in `open' 
    from /usr/local/lib/ruby/1.9.1/net/http.rb:644:in `block in connect' 
    from /usr/local/lib/ruby/1.9.1/timeout.rb:44:in `timeout' 
    from /usr/local/lib/ruby/1.9.1/timeout.rb:89:in `timeout' 
    from /usr/local/lib/ruby/1.9.1/net/http.rb:644:in `connect' 
    from /usr/local/lib/ruby/1.9.1/net/http.rb:637:in `do_start' 
    from /usr/local/lib/ruby/1.9.1/net/http.rb:632:in `start' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/vendor/net/http/persistent.rb:224:in `connection_for' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/vendor/net/http/persistent.rb:358:in `request' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/fetcher.rb:145:in `fetch' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/fetcher.rb:173:in `fetch_dependency_remote_specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/fetcher.rb:132:in `fetch_remote_specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/fetcher.rb:70:in `specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/source.rb:234:in `block in remote_specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/source.rb:232:in `each' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/source.rb:232:in `remote_specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/source.rb:165:in `fetch_specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/source.rb:70:in `specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:205:in `block (2 levels) in index' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:202:in `each' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:202:in `block in index' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/index.rb:9:in `build' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:198:in `index' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:192:in `resolve' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/definition.rb:122:in `resolve_remotely!' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/installer.rb:48:in `run' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/installer.rb:12:in `install' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/cli.rb:220:in `install' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/vendor/thor/task.rb:22:in `run' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/vendor/thor.rb:263:in `dispatch' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/lib/bundler/vendor/thor/base.rb:386:in `start' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.5/bin/bundle:13:in `<main>' 
Fetching gem metadata from http://rubygems.org/.Unfortunately, a fatal error has occurred. Please see the Bundler 
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks! 

嘗試了很多事情如寶石般更新--system並安裝bundler.Still不工作,我不知道why.Please HELP

My system details- 

ruby -v 
>> ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] 

rails -v 
>> Rails 3.1.0 

gem -v 
>> 2.1.8 

我爲在Ubuntu 12.04

+3

好像你有麻煩的網絡連接(打捆機不能打電話回家)。 –

+0

嘗試'sudo gem update --system'並重新啓動'bundle install' – JoJoS

+1

Rubygems今天有問題。以後再試... – spickermann

回答

0
工作

有時候,如果你的gemfile文件的源頭是'https://rubygems.org',那麼這個軟件包將會失敗如果你想改變https到http