diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 01e52c6..d6e554d 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -1,5 +1,7 @@ # Development +Install instructions in INSTALL.md + This is just random tips for development. Not a full documentation. # Handy commands diff --git a/Dockerfile b/Dockerfile index faa6fb1..f9bc3d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,7 @@ RUN apt-get update && apt-get -y upgrade \ libxslt1-dev libxml2-dev \ imagemagick libmagickwand-dev \ nodejs \ + phantomjs \ firefox-esr # Separate Gemfile ADD so that `bundle install` can be cached more effectively diff --git a/Gemfile b/Gemfile index b97468b..9cab76e 100644 --- a/Gemfile +++ b/Gemfile @@ -113,5 +113,6 @@ group :test do end group :development, :test do + gem 'pry-rails' gem 'pry-byebug', '~> 1.3.2' end diff --git a/Gemfile.lock b/Gemfile.lock index d479133..c320b78 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -294,6 +294,8 @@ GEM pry-byebug (1.3.3) byebug (~> 2.7) pry (~> 0.10) + pry-rails (0.3.9) + pry (>= 0.10.4) public_suffix (4.0.3) puma (4.3.3) nio4r (~> 2.0) @@ -469,6 +471,7 @@ DEPENDENCIES phantomjs poltergeist pry-byebug (~> 1.3.2) + pry-rails public_suffix puma rails (~> 6.0.2.1) diff --git a/INSTALL.md b/INSTALL.md index f3a3c5f..c4fc082 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,16 +1,8 @@ -# Production Install (Ubuntu LTS) +# Install (Ubuntu LTS) ENSL Website is fairly easy to run. -## 1. Install reverse proxy - -Install apache, nginx etc. reverse proxy. It will take requests from the users and pass them to ENSL website. Sample configuration availble @ ext/nginx. - -https://www.nginx.com/resources/wiki/start/ - - sudo apt-get install nginx - -## 2. Install docker and docker-compose +## 1. Install docker and docker-compose https://docs.docker.com/install/ https://docs.docker.com/compose/install/ @@ -20,9 +12,13 @@ Install docker + docker-compose: wget -O - 'https://get.docker.com/'|bash sudo curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose -## 3. Install git +## 2. Install git -## 4. Download ENSL website and install it +https://git-scm.com/book/en/v2/Getting-Started-Installing-Git + + sudo apt-get install nginx + +## 3. Download ENSL website and install it Now create the required directories, e.g. `/srv/ensl.org` @@ -38,4 +34,14 @@ If the database does not exist, it will be created with settings from .env file Finally, Start the docker containers. docker-compose build - docker-compose --rm up \ No newline at end of file + docker-compose --rm up + +## 4. Install reverse proxy + +Install apache, nginx etc. reverse proxy. It will take requests from the users and pass them to ENSL website. Sample configuration availble @ ext/nginx. + +https://www.nginx.com/resources/wiki/start/ + + sudo apt-get install nginx + +*Skip this step if you are only doing development.* diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index 8cb6a1b..23550bd 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -3,7 +3,6 @@ //= require jquery.periodicalupdater //= require jquery.jplayer.min //= require flowplayer -//= require tinymce-jquery //= require yetii //= require local //= require shoutbox diff --git a/app/assets/javascripts/misc.js.coffee b/app/assets/javascripts/misc.js.coffee index 3a861c0..fb7f44e 100644 --- a/app/assets/javascripts/misc.js.coffee +++ b/app/assets/javascripts/misc.js.coffee @@ -17,7 +17,7 @@ $ -> $select.trigger 'DOMSubtreeModified' - $('a[href=#form_submit]').click -> + $('a[href=\\#form_submit]').click -> $(this).closest('form').submit() return false diff --git a/app/views/articles/_form.html.erb b/app/views/articles/_form.html.erb index 1e5078b..362cd39 100644 --- a/app/views/articles/_form.html.erb +++ b/app/views/articles/_form.html.erb @@ -27,7 +27,7 @@