From f8ec87e1553fb5bb52f51e1609029485dd4d3545 Mon Sep 17 00:00:00 2001 From: Greg Sutcliffe Date: Sat, 21 Feb 2015 17:38:48 +0000 Subject: [PATCH 1/3] Add db bundler groups so they can be excluded with --without --- Gemfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 1ab1db7e..929049ff 100644 --- a/Gemfile +++ b/Gemfile @@ -16,11 +16,12 @@ gem 'uglifier', '~> 2.5.3' gem 'jquery-rails', '~> 3.1.2' -# you may comment out the database driver you will not be using. +# you may comment out the database driver(s) you will not be using. # This will prevent a native build of the driver. Building native drivers is not -# always possible on all hosters -gem "sqlite3", "~> 1.3.9" -gem "mysql2", "~> 0.3.16" +# always possible on all platforms +# Alternatively use --without arguments to bundler to not install that group +gem "sqlite3", "~> 1.3.9", group: :sqlite +gem "mysql2", "~> 0.3.16", group: :mysql gem "RedCloth", "~> 4.2.9" gem "sanitize", "~> 3.0.2" From 22ffb3d2bae925a3be836e60996290675a422af2 Mon Sep 17 00:00:00 2001 From: Greg Sutcliffe Date: Sat, 21 Feb 2015 22:09:25 +0000 Subject: [PATCH 2/3] Update install doc to use db groups --- doc/installation.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/installation.md b/doc/installation.md index 1d29cf6e..402a6755 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -50,8 +50,20 @@ You need to create a database and database-user to use with Tracks. For this, yo Tracks is built upon a number of Ruby libraries (known as ‘gems’). The Bundler tool makes it easy to install all the gems that Tracks needs, and ensures that they are all the correct versions. -1. Edit the file `Gemfile` in the Tracks root directory. You may comment out any database drivers you will not be using. You may also comment out `therubyracer` if you are installing Tracks on Windows or Mac OS X, or if you have another JavaScript runtime such as Node.js installed. -2. Run the command `bundle install --without development test` in the directory that you unzipped your Tracks download to. +1. If you are installing Tracks on Windows or Mac OS X, or if you have another JavaScript runtime such as Node.js installed, edit the file `Gemfile` in the Tracks root directory, and comment out `therubyracer`. +2. In the directory that you unzipped your Tracks download to, install all the appropriate gems by running: + * If you are using SQLite: + + ``` + bundle install --without development test mysql + ``` + + * If you are using MySQL: + + ``` + bundle install --without development test sqlite + ``` + 3. Wait for Bundler to finish installing the necessary gems that Tracks needs. This can take some time depending on the speed of your internet connection and the speed of the system you’re installing Tracks on. ## Configure variables From 030e9df935c37c8bc6e835695357b25abb4728b9 Mon Sep 17 00:00:00 2001 From: Dan Rice Date: Tue, 24 Feb 2015 21:29:10 -0500 Subject: [PATCH 3/3] Place therubyracer in a gem group --- Gemfile | 2 +- doc/installation.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 929049ff..00f9282c 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,7 @@ gem 'coffee-rails', '~> 4.0.1' gem 'actionpack-xml_parser', '~> 1.0.1' # See https://github.com/sstephenson/execjs#readme for more supported runtimes -gem 'therubyracer' +gem 'therubyracer', group: :therubyracer gem 'uglifier', '~> 2.5.3' diff --git a/doc/installation.md b/doc/installation.md index 402a6755..28196d49 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -50,8 +50,7 @@ You need to create a database and database-user to use with Tracks. For this, yo Tracks is built upon a number of Ruby libraries (known as ‘gems’). The Bundler tool makes it easy to install all the gems that Tracks needs, and ensures that they are all the correct versions. -1. If you are installing Tracks on Windows or Mac OS X, or if you have another JavaScript runtime such as Node.js installed, edit the file `Gemfile` in the Tracks root directory, and comment out `therubyracer`. -2. In the directory that you unzipped your Tracks download to, install all the appropriate gems by running: +1. In the directory that you unzipped your Tracks download to, install all the appropriate gems by running: * If you are using SQLite: ``` @@ -64,7 +63,8 @@ Tracks is built upon a number of Ruby libraries (known as ‘gems’). The Bundl bundle install --without development test sqlite ``` -3. Wait for Bundler to finish installing the necessary gems that Tracks needs. This can take some time depending on the speed of your internet connection and the speed of the system you’re installing Tracks on. + * If you are installing Tracks on Windows or Mac OS X, or if you have another JavaScript runtime such as Node.js installed, you may also append `therubyracer` as an additional "without" parameter. +2. Wait for Bundler to finish installing the necessary gems that Tracks needs. This can take some time depending on the speed of your internet connection and the speed of the system you’re installing Tracks on. ## Configure variables