okada-takuya / jay

Jay is a simple markdown editor for memo and taking minutes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

What is jay?

jay is a simple markdown editor for memo and taking minutes

Setup Ruby Environment

Ruby2.2.1
Rails4.2.1

I recommend you to install new Ruby and Bundler on the top of Rbenv before install jay.

  1. Install rbenv + ruby-build (check https://github.com/sstephenson/rbenv#basic-github-checkout for details)
    $ git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
    $ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
    # Edit your shell dot files to add some path and environment variables.
        
  2. Install Ruby and Bundler
    # Install ruby 2.2.1
    $ rbenv install 2.2.1
    
    # Installation check
    $ rbenv global 2.2.1
    $ ruby -v # -> You will see: ruby 2.2.1...
    
    # Install bundler for your new Ruby
    $ gem install bundler
    
    # Activate bundler
    $ rbenv rehash
    
    # Get back to your system default Ruby if you want
    $ rbenv global system # say, /usr/bin/ruby
    $ ruby -v
        

Install jay

Clone jay

  1. clone jay from github
    $ git clone https://github.com/nomlab/jay.git ~/Programs/jay
        
  2. Setup to use installed ruby
    $ cd ~/Programs/jay
    $ ruby -v # -> You will see: ruby 2.2.1...
        

Setup config files

  1. Install vendor/bundle stuffs
    $ bundle install --path vendor/bundle
        
  2. Setup secret key
    $ bundle exec rake secret # -> You will see: foobarbuz... Copy the string.
    $ vim config/secrets.yml # -> Replace all <SECRETKEY> with the string outputted
        
  3. Setup OAuth and webhook
    $ cp config/application_settings_sample.yml config/application_settings.yml
    $ vim config/application_settings.yml # -> Input your toggl token
        
  4. Setup DB
    $ bundle exec rake db:migrate
    $ bundle exec rake db:migrate RAILS_ENV=production
        

Launch jay

development

# start
$ export RAILS_ENV="development"
$ export RAILS_SERVE_STATIC_FILES=true
$ bundle exec rails server -p 3000 -d -e "$RAILS_ENV"
$ open http://localhost:3000

# stop
$ kill $(cat tmp/pids/server.pid)

production

# start
$ export RAILS_ENV="production"
$ export RAILS_SERVE_STATIC_FILES=true
$ bundle exec rails server -p 3000 -d -e "$RAILS_ENV"
$ bundle exec rake assets:precompile RAILS_ENV="$RAILS_ENV"
$ bundle exec rake assets:precompile:image
$ open http://localhost:3000

# stop
$ kill $(cat tmp/pids/server.pid)

About

Jay is a simple markdown editor for memo and taking minutes

License:MIT License


Languages

Language:Ruby 52.0%Language:CoffeeScript 22.6%Language:CSS 13.7%Language:HTML 11.1%Language:JavaScript 0.6%