Skip to content

Commit

Permalink
Using sqlite3 for testing and development
Browse files Browse the repository at this point in the history
  • Loading branch information
Stoyan Nikolov committed Apr 6, 2023
1 parent 88ae00e commit 843624f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ gem 'better_settings'
gem 'rails', '~> 7.0'

# Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/] (https://github.com/ged/ruby-pg)
gem 'pg', '>= 0.18', '< 2.0'
#gem 'pg', '>= 0.18', '< 2.0'

# sqlite3 instead of pg
gem 'sqlite3'

# Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications (https://puma.io)
gem 'puma', '~> 5.0'
Expand Down
5 changes: 3 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ GEM
parallel (1.22.1)
parser (3.1.2.0)
ast (~> 2.4.1)
pg (1.3.5)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
Expand Down Expand Up @@ -246,6 +245,8 @@ GEM
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
sqlite3 (1.6.2)
mini_portile2 (~> 2.8.0)
strscan (3.0.3)
thor (1.2.1)
timeout (0.2.0)
Expand Down Expand Up @@ -296,7 +297,6 @@ DEPENDENCIES
oj
oj_serializers
pagy
pg (>= 0.18, < 2.0)
pry-byebug
puma (~> 5.0)
rack-mini-profiler (~> 2.0)
Expand All @@ -306,6 +306,7 @@ DEPENDENCIES
rubocop-performance
rubocop-rails
selenium-webdriver
sqlite3
tzinfo-data
vite_rails (~> 3.0)
web-console (>= 4.1.0)
Expand Down
12 changes: 8 additions & 4 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ default: &default
#min_messages: notice

development:
<<: *default
database: pingcrm_development
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: pingcrm_test
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000

# As with config/credentials.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
Expand Down

0 comments on commit 843624f

Please sign in to comment.