Installation of PIONE
Installation of PIONE
Contents
Introduction
PIONE is based on ruby, gem, bundle. Check if ruby, gem, bundle have been installed。ruby should have a version number greater than or equla to 1.9.2. Versions and installed directories of ruby, gem, bundle can be checked as bellow. If Eos has been installed previously, they may be found under the Eos directory. If the directories are not the same, PIONE may have problems in installation and execution. It is recommended that they are in the same directory.
$ which ruby /Eos/util/X86MAC64/bin/ruby $ which gem /Eos/util/X86MAC64/bin/gem $ which bundle /Eos/util/X86MAC64/bin/bundle $ ruby -v ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin12.5.0] $ gem -v 1.8.23.2 $ bundle -v Bundler version 1.7.7
If there are more than one ruby/gem, the unused versions should be deleted or renamed like gem1.9
Installation
When ruby/gem has been installed
gem in ruby does work in the installation。Installation is done in the same directory as gem. When /usr/local or /sw/ are destinations, the administrator must do the installation.
$ gem install pione
On update,
$ gem update pione
Installing directly from github
Download POINE from github.
$ git clone https://github.com/pione/pione.git
Update by bundle.
Firstly, check if you have "bundle". If yes, you will see a line including bundle
$ which bundle /Eos/util/X86MAC64/bin/bundle
Secondly, update bundle, if you have it. It is to be noted that the bundle install command is run in /pione, or
set its path beforehand (Gemfile, vender/bundle and files below it are necessary).
$ cd pione $ bundle install --path vender/bundle
Setting environment
Run the following for defining variables of PATH and RUBYLIB.
$ cd ${PIONE_REP} $ export PATH=$PWD/bin:$PATH $ export RUBYLIB=$PWD/lib
or running pione/misc/env.sh is able to set the environment.
You may well have this setting to be performed after your shell starts, as in Setting environment of Eos.
Those environment variables, and commands such as bundle install, are not needed on install.
Installation with PIONE Webclient, using a installation shell
The following commands can be used to start a shell for installation.
$ wget -q -O - https://raw.githubusercontent.com/pione/pione-webclient/master/install.sh | sh
If wget is not available, using curl,
$ curl https://raw.githubusercontent.com/pione/pione-webclient/master/install.sh | sh
However, you need ruby/gem/bundler(ruby tool)for this. Install ruby/gem, if you have not. When gem has been installed, but not bundler, you can install using gem. You input the following beforehand.
$ sudo gem install bundler
Check the install
Submit the following command commands to check if the install of PIONE was OK.
$ pione -v pione 0.5.0
To run PIONE and PIONE Webclient、refer to PIONE starting。
The problem about install
Currently, working on LINUX/OS-X is sure. But, There is problems on Windows, in relation to implementation of Ruby's Thread.
In some environments, git/ruby/gem/bundle it may not have been installed git/ruby/gem/bundle and etc... .
gitcan be installed in each environment (e.g. apt-get/yum). Most packages are supported.
Currently, about the version of ruby is 1.9.2 of higher and 1.9-generations required. It is a plan that corresponds to the 2.1 in the future. If your LINUX corresponds only version 1.9 of ruby, you need to download the source code and install. Then, ZLIB/YAML is required. First install those, and next install configure/make/make of ruby.
About gem, install it by downloading rubygems.
bundle can be installed by gem.
An error and how to get around
An error message:
$ bundle install --path vender/bundle Could not load OpenSSL. You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are available at http://rvm.io/packages/openssl.
may suggest that OpenSSL is not included in ruby that you use. Use irb command as below. (if Ruby TIPS#irb)is not included, you may have to recompile ruby。
An example when not included in ruby
$ irb irb(main):001:0> require 'openssl' LoadError: libssl.so.0.9.8: cannot open shared object file: No such file or directory
When included in [[ruby], you will see "true"。
$ irb irb(main):001:0> require 'openssl' => true
Compilation of ruby
Compilation of ruby is described.
Checking of autoconf
Check if you have installed autoconf, which is used for compilation.
$ which autoconf /usr/local/bin/autoconf
If not installed, you download its zipped form from Autoconf - summary, unzip, and compile as sown below.(Note: a diff file is only a difference. You download the most recent version, which is other than the diff file.)
cd (directory having autoconf) ./configure make make install
Checking the libraries
Before compilation, you check if you have all the necessary libraries .In case of openssl described above, you need to have openssl to be installed. When Eos has been installed, all the libraries are under the Eosdirectory. Update those according to Eos update.You can find the libraries in /Eos/hostdepend/X86MAC/util/X86MAC/(In case of Mac). For a quick update, you visit [1], select your OS, download only util directory, and then update.
Download and install
After installing the libraries, download the source code of your choice version from オブジェクト指向スクリプト言語 Ruby. (Version numbers greater than or equal to 1.9.2, and less than 2.0.0)
You complile the source code as below。
How you compile (Do this at the root directory of the source code)
$ autoconf $ ./configure --prefix="(absolute path of your destination directory)" $ make $ make install
(Note) The destination directory(where you can find bin and lib directories)should be given in the absolute path。When you update ruby from within Eos, you have to be careful. This is because${EOSHOME}/util/${EOS_HOSTDIR} and directories below it are linked to ${EOS_HOME}/hostdepend/${EOS_HOSTDIR}/util/${EOS_HOSTDIR}.(Refer to :よく使うシェルコマンド#pwdによる注意事項)
Check the update
When those commands are successful, check if the version number and the libraries have been updated as shwon below.
$ ruby -v ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin12.5.0] $ gem -v 1.8.23.2 /Eos$ irb irb(main):001:0> require 'openssl' => true
PIONE install example
Install YAMLand others. ↓ Install (compile) Ruby (greater than 1.9.2, but less tahn 2). ↓ Install bundle by gem. ↓ Install PIONE by gem. ↓ Install PIONE Webclient.
Notes on the update
PIONE update can be done in two ways, via github and via gem. The update via github requires that PIONE is downloaded/installed from github beforehand. The update via gem is possible if you have ruby, gem, bundle. Both updates make your version the newest. In the gem use, its update reflects the data immediately after a verion up. In the github use, this update reflects the source code changes. Therefore, github is recommended when you like to check very new bug corrections.