我正在使用 OS X 10.7、ruby 1.8.7(2010-01-10 补丁级别 249)和 rails 3.2.1、rubygems 1.8.24:
➜ code ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
➜ code gem list | grep rails
rails (3.2.1, 3.2.0, 3.1.0, 3.0.5)
➜ code gem list | grep gem
rubygems-update (1.8.24)
至于 gem 的来源:
➜ code gem sources
*** CURRENT SOURCES ***
http://gems.rubyforge.org
http://gems.github.com
http://gems.github.com
http://gems.github.com
http://production.s3.rubygems.org
http://production.s3.rubygems.org.s3.amazonaws.com/
http://rubygems.org/
现在我正在尝试创建一个 rails 项目:
➜ code rails new blogging -d mysql
Using #!/usr/bin/ruby begin require 'hirb' # sudo gem install cldwalker-hirb --source http://gems.github.com Hirb.enable rescue LoadError end def change_log(stream) ActiveRecord::Base.logger = Logger.new(stream) ActiveRecord::Base.clear_active_connections! end def show_log change_log(STDOUT) end def hide_log change_log(nil) end from /Users/Apple/.railsrc
create
create README.rdoc
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/images/rails.png
create app/assets/javascripts/application.js
create app/assets/stylesheets/application.css
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/mailers
create app/models
create app/views/layouts/application.html.erb
create app/mailers/.gitkeep
create app/models/.gitkeep
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/backtrace_silencers.rb
create config/initializers/inflections.rb
create config/initializers/mime_types.rb
create config/initializers/secret_token.rb
create config/initializers/session_store.rb
create config/initializers/wrap_parameters.rb
create config/locales
create config/locales/en.yml
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create doc
create doc/README_FOR_APP
create lib
create lib/tasks
create lib/tasks/.gitkeep
create lib/assets
create lib/assets/.gitkeep
create log
create log/.gitkeep
create public
create public/404.html
create public/422.html
create public/500.html
create public/favicon.ico
create public/index.html
create public/robots.txt
create script
create script/rails
create test/fixtures
create test/fixtures/.gitkeep
create test/functional
create test/functional/.gitkeep
create test/integration
create test/integration/.gitkeep
create test/unit
create test/unit/.gitkeep
create test/performance/browsing_test.rb
create test/test_helper.rb
create tmp/cache
create tmp/cache/assets
create vendor/assets/javascripts
create vendor/assets/javascripts/.gitkeep
create vendor/assets/stylesheets
create vendor/assets/stylesheets/.gitkeep
create vendor/plugins
create vendor/plugins/.gitkeep
run bundle install
Enter your password to install the bundled RubyGems to your system:
Fetching gem metadata from https://rubygems.org/.........
Using rake (0.9.2.2)
Gem::RemoteFetcher::FetchError: Errno::ETIMEDOUT: Operation timed out - connect(2) (https://rubygems.org/gems/i18n-0.6.0.gem)
An error occured while installing i18n (0.6.0), and Bundler cannot continue.
Make sure that `gem install i18n -v '0.6.0'` succeeds before bundling.
我手动安装了 i18n,但仍然遇到同样的错误,我向 gem 添加了新资源,但没有运气。
任何帮助将不胜感激。
在此先感谢