我正在学习RoR throgh Michael Hartl的书。在第三章通过命令rails new sample_app --skip-unit-test创建sample_app时,我在运行bundle intstall之后得到了这个。
/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!
尝试了很多东西,比如gem update --system和install bundler.Still not working,我不知道为什么。请帮助
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