在database.yml(rails生成的默认文件)中:
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
Run Code Online (Sandbox Code Playgroud)
运行时rake about,我有这个错误:
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded.
Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by
ActiveRecord).
Run Code Online (Sandbox Code Playgroud)
如果我添加pggem,则rake about提供此输出:
About your application's environment
Ruby version 2.1.0-p0 (x86_64-darwin13.0)
RubyGems version 2.2.2
Rack version 1.5
Rails …Run Code Online (Sandbox Code Playgroud)