Go to file
nilsding 70aec0b86e back to bootswatch. 2014-11-28 20:23:17 +01:00
app back to bootswatch. 2014-11-28 20:23:17 +01:00
bin added rspec-core binstub 2014-11-14 13:39:26 +01:00
config added (ajax) answer controller 2014-11-26 17:05:46 +01:00
db added admin field to users 2014-11-26 17:02:47 +01:00
lib first commit 2014-08-01 11:23:47 +02:00
log first commit 2014-08-01 11:23:47 +02:00
public modified 404, 422 and 500 pages a bit 2014-11-12 19:53:14 +01:00
spec fixed tests 2014-11-18 20:58:55 +01:00
test added inbox ajax thing 2014-11-11 16:19:20 +01:00
vendor/assets first commit 2014-08-01 11:23:47 +02:00
.gitignore modified gitignore 2014-11-24 17:52:46 +01:00
.rspec added RSpec 2014-11-13 18:12:51 +01:00
Gemfile back to bootswatch. 2014-11-28 20:23:17 +01:00
Gemfile.lock back to bootswatch. 2014-11-28 20:23:17 +01:00
README.md changed a few things 2014-10-28 06:36:38 +01:00
Rakefile first commit 2014-08-01 11:23:47 +02:00
config.ru first commit 2014-08-01 11:23:47 +02:00

README.md

justask build status

Requirements

  • UNIX-like system (Linux, *BSD, ...)
  • ruby 1.9.3+
  • Bundler
  • PostgreSQL or MySQL

Installation

Database

PostgreSQL

$ sudo -u postgres psql -d template1
template1=# CREATE USER justask CREATEDB;
template1=# CREATE DATABASE justask_production OWNER justask;
template1=# \q

Try connecting to the database:

$ psql -U justask -d justask_production

MySQL

$ mysql -u root -p
# change 'hack me' in the command below to a real password
mysql> CREATE USER 'justask'@'localhost' IDENTIFIED BY 'hack me';
mysql> SET storage_engine=INNODB;
mysql> CREATE DATABASE IF NOT EXISTS `justask_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `justask_production`.* TO 'justask'@'localhost';
mysql> \q

Try connecting to the database:

$ mysql -u justask -p -D justask_production

justask

Clone the Source

$ git clone https://git.rrerr.net/nilsding/justask.git justask

Configure It

# Change into the justask directory
$ cd justask

# Copy the example config
$ cp config/justask.yml.example config/justask.yml

# Edit the configuration file
$ vi config/justask.yml

Database Configuration

# PostgreSQL only:
$ cp config/database.yml.postgres config/database.yml

# MySQL only:
$ cp config/database.yml.mysql config/database.yml

# MySQL and remote PostgreSQL only:
$ vi config/database.yml

# Both:
# Make database.yml readable only for you
chmod o-rwx config/database.yml

Install Gems

# For PostgreSQL (note: the option says "without ... mysql")
$ bundle install --deployment --without development test mysql

# Or, if you use MySQL
$ bundle install --deployment --without development test postgres

Initialize Database

$ bundle exec rake db:migrate RAILS_ENV=production

Compile Assets

$ bundle exec rake assets:precompile RAILS_ENV=production