我正在遵循Rails教程中的指示,但在尝试使用脚手架命令时遇到了问题。
运行以下命令时:
rails generate scaffold User name:string email:string
我遇到了错误:
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in `rescue in establish_connection': Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (can't activate sqlite3 (~> 1.3.4), already activated sqlite3-1.3.3-x86-mingw32. Make sure all dependencies are added to Gemfile.) (RuntimeError)
运行中:
gem install activerecord-sqlite3-adapter
I got the error:
ERROR: Could not find a valid gem 'activerecord-sqlite3-adapter' (>= 0) in any repository
ERROR: Possible alternatives: activerecord-jdbcsqlite3-adapter, activerecord-sqlserver-adapter, activerecord-nulldb-adapter, activerecord-spatialite-adapter, activerecord-simpledb-adapter
我的Gemfile文件长这样:
source 'http://rubygems.org'
gem 'rails', '3.1.0'
gem 'sqlite3', '1.3.3'
...
我正在运行Windows 7 x64操作系统。 有什么想法?