Skip to content

Commit 4d185fb

Browse files
author
Tair Assimov
committed
Use sqlite3 in test/development environment
1 parent 11d8854 commit 4d185fb

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

Gemfile

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source 'https://rubygems.org'
33

44
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
55
gem 'rails', '4.2.4'
6-
gem 'pg'
6+
77
# Use SCSS for stylesheets
88
gem 'sass-rails', '~> 5.0'
99
# Use Uglifier as compressor for JavaScript assets
@@ -39,10 +39,15 @@ group :development, :test do
3939
end
4040

4141
group :development do
42+
gem 'sqlite3'
4243
# Access an IRB console on exception pages or by using <%= console %> in views
4344
gem 'web-console', '~> 2.0'
4445

4546
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
4647
gem 'spring'
4748
end
4849

50+
group :production do
51+
gem 'pg'
52+
end
53+

Gemfile.lock

+2
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ GEM
138138
actionpack (>= 3.0)
139139
activesupport (>= 3.0)
140140
sprockets (>= 2.8, < 4.0)
141+
sqlite3 (1.3.11)
141142
sshkit (1.7.1)
142143
colorize (>= 0.7.0)
143144
net-scp (>= 1.1.2)
@@ -180,6 +181,7 @@ DEPENDENCIES
180181
sass-rails (~> 5.0)
181182
sdoc (~> 0.4.0)
182183
spring
184+
sqlite3
183185
turbolinks
184186
uglifier (>= 1.3.0)
185187
unicorn

config/database.yml

+14-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
# SQLite version 3.x
2+
# gem install sqlite3
3+
#
4+
# Ensure the SQLite 3 gem is defined in your Gemfile
5+
# gem 'sqlite3'
6+
#
7+
default: &default
8+
adapter: sqlite3
9+
110
development:
2-
adapter: postgresql
3-
database: dockbit_demo_rails_development
4-
pool: 5
5-
timeout: 5000
11+
<<: *default
12+
database: db/development.sqlite3
13+
614
test:
7-
adapter: postgresql
8-
database: dockbit_demo_rails_test
9-
pool: 5
10-
timeout: 5000
15+
<<: *default
16+
database: db/test.sqlite3
1117

1218
production:
1319
adapter: postgresql

0 commit comments

Comments
 (0)