我按照rails tutorial中的說明進行操作,試圖使用scaffold命令時卡住了。rails sqlite適配器錯誤
當運行:
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
我得到了錯誤:
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操作系統上運行。
任何想法?
我加了我的,就像這樣:gem'sqlite3'。那爲我解決了同樣的問題:-) – MarlonRibunal