Skip to content

Commit

Permalink
README: show a test database made in mysql, since sqlite won't work
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs committed Jul 17, 2017
1 parent 9a11ab8 commit a0b769e
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Lobsters Rails Project

This is the
This is the
[quite sad](https://www.reddit.com/r/rails/comments/6jz7tq/source_code_lobsters_a_hacker_news_clone_built/)
source code to the site operating at
[https://lobste.rs](https://lobste.rs).
Expand All @@ -25,30 +25,34 @@ file.

$ git clone git://github.com/jcs/lobsters.git
$ cd lobsters
lobsters$
lobsters$

* Run Bundler to install/bundle gems needed by the project:

lobsters$ bundle

* Create a MySQL (other DBs supported by ActiveRecord may work, only MySQL and
MariaDB have been tested) database, username, and password and put them in a
`config/database.yml` file:
`config/database.yml` file. You will also want a separate database for
running tests:

development:
adapter: mysql2
encoding: utf8mb4
reconnect: false
database: lobsters_dev
socket: /tmp/mysql.sock
username: *username*
password: *password*
username: *dev_username*
password: *dev_password*
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
adapter: mysql2
encoding: utf8mb4
reconnect: false
database: lobsters_test
socket: /tmp/mysql.sock
username: *test_username*
password: *test_password*

* Load the schema into the new database:

Expand Down

0 comments on commit a0b769e

Please sign in to comment.