-
Notifications
You must be signed in to change notification settings - Fork 0
Tools Installation and Setup
Wiki ▸ Tools Installation and Setup
On you Windows PC, set you proxy environment variables, http_proxy
and https_proxy
, up once and for all (well, until you will have to change your PC password):
-
find the panel where to edit the environment variable
-
if
http_proxy
orhttps_proxy
does not yet exist, create it, i.e. pressNew
button -
set each of the
http_proxy
andhttps_proxy
variables value to (Note:http://
)http://user:[email protected]:9512
of course use as
id
you PC account id (without the Domain [i.e.SKY
]), and aspassword
you PC account password
You need the following tools (instructions in the sections below):
Git on Windows
- Download the 64 bit portable version of Git for Windows.
- Extract it in
C:\opt\git
-
Open the Git for Windows shell from your Start menu
-
Create a new folder for your repositories called
C:\repos
-
Execute the following command on the shell:
$ cd /c/repos/ $ git clone https://github.com/euctrl-pru/website.git
If all goes well you will now have a local copy of your website repository in the specified folder
The steps that follow are a subset of the instructions from Julian Thilo for installing Jekyll on Windows.
-
Download RubyInstaller
v2.2.x
. -
Install it in
C:\opt\Ruby22-x64
). -
Update
PATH
and prepend it withC:\opt\Ruby22-x64\bin
. -
download the Ruby DevKit for use with Ruby 2.0 and above (x64 - 64bits only)
-
extract it in
C:\opt\RubyDevKit\
-
follow the instructions as from here in a MS Windows terminal:
C:\Users\xyzzy> cd C:\opt\RubyDevKit\ C:\opt\RubyDevKit> ruby dk.rb init
Edit the generate
config.yml
file and put at the end:- C:/opt/Ruby22-x64
Then run:
C:\opt\RubyDevKit> ruby dk.rb install
-
From a
PowerShell
orcmd
terminal installjekyll
andbundler
:~> gem install jekyll ~> gem install bundler ~> gem install wdm
- Download Command Line - SQLcl
- Unzip it under
C:\opt\
, it will create a folder likeC:\opt\sqlcl-4.2.0.16.175.1027-no-jre
- Update PATH with
C:\opt\sqlcl-4.2.0.16.175.1027-no-jre\sqlcl\bin
(according to the version you installed)
See this page
Follow the instruction from Swirl or just do the following:
-
R
- Download the R installer from here (MS Windows) (it will work even without admin rights.)
- Install it under
c:\opt\R
, something like likeC:\opt\R\R-3.2.2
-
RStudio
- Download the RStudio Preview zip file from here
- Unzip it under
c:\opt\R
, so that it will end up to something like likeC:\opt\R\RStudio-1.0.44
-
RTools (needed for installation of packages from source)
-
Download the RTools from here, take the latest frozen version compatible with the above version of R, i.e.
RTools33.exe
-
Install it under
C:\Rtools
(select the option to updatePATH
, the one for the update of the registry will fail, please uncheck it or ignore the error at the end of the installation) -
in your HOME folder create a file,
.Renviron
, with your HTTP(s) proxy settingsHTTP_PROXY = "<usr>:<password>@pac.eurocontrol.int:9512" HTTPS_PROXY = "<usr>:<password>@pac.eurocontrol.int:9512"
-
-
Run RStudio and install the tidyverse package by typing the following in the console:
> install.packages("tidyverse")
-
ROracle
- Download Instant Client from Oracle here
(you need an account and have to agree on terms)- Instant Client Package - Basic (12.1 x64 version)
- Instant Client Package - SDK (12.1 x64 version)
- Unzip under
C:\opt\oracle
so that it all will end up to sometheing likeC:\opt\oracle\instantclient_12_1
- Set the environment variable
OCI_LIB64
toC:\opt\oracle\instantclient_12_1
- Add
C:\opt\oracle\instantclient_12_1
toPATH
- edit
C:/opt/R/R-3.3.2/etc/$Arch/Makeconf
file appropriately to point to the corresponding compiler for your machine's architecture (check withwmic os get osarchitecture
, it should say something like64-bit
then$Arch
above isx64
) - this is new with the new toolchain we use with R >= 3.3.0:> BINPREF ?= c:/Rtools/mingw_64/bin/
- From within RStudio
-
Check whether you development environment is ok:
> system('g++ -v') Using built-in specs. COLLECT_GCC=C:\opt\R\Rtools33\GCC-46~1.3\bin\G__~1.EXE COLLECT_LTO_WRAPPER=c:/opt/r/rtools33/gcc-46~1.3/bin/../libexec/gcc/i686-w64-mingw32/4.6.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: /data/gannet/ripley/Sources/mingw-test3/src/gcc/configure .... Thread model: win32 gcc version 4.6.3 20111208 (prerelease) (GCC)
> system('where make') C:\opt\R\Rtools33\bin\make.exe
-
Install the
devtools
package:> install.packages("devtools") > library(devtools) > find_rtools() [1] TRUE
-
Install the
ROracle
package:> install.packages("ROracle")
and test it:
> library(ROracle) > drv <- dbDriver("Oracle") > con <- dbConnect(drv, "prutest", "youknowthepassword", dbname="porape5") > rs <- dbSendQuery(con, "select sysdate from dual") > fetch(rs) SYSDATE 1 2016-11-04 12:58:25
and disconnect at the end:
> dbDisconnect(con)
-
- Download Instant Client from Oracle here
-
Tools for package creation:
- Ghostscript, qpdf and relevant ENV vars
R_GSCMD
,R_QPDF
. See this link
- Ghostscript, qpdf and relevant ENV vars
-
git push
will push commits and tags at the same time:$ git config --global push.followTags true
-
in case you get the following error
Liquid Exception: incompatible character encodings: UTF-8 and IBM437
execute the following:$ /c/Windows/System32/chcp.com 65001
-
install the required gems
~> cd website ~> bundler install
-
build and serve the site
~> bundle exec jekyll build ~> bundle exec jekyll serve
-
point your browser to http://localhost:4000
We clone website
and work there (see Contributor Workflow). When happy we save the result in euctrl-pru.github.io
.
For working from the command line, see hub and relevant binaries