This repository has been archived by the owner on Sep 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
UPGRADE.html
180 lines (149 loc) · 5.24 KB
/
UPGRADE.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<h1>Upgrading</h1>
<p><em>Note: Namespace and annotation values are upgraded in BEL files.</em>
<br><br></p>
<h2>Install Ruby (Windows)</h2>
<ol>
<li>Download <a href="http://rubyinstaller.org/downloads">RubyInstaller</a>.
<ul>
<li>Versions 1.9.3 and 2.x.x are supported.</li>
</ul></li>
<li>Install RubyInstaller version.
<ul>
<li>Enable the <em>Add Ruby executables to your PATH</em> option presented during installation.</li>
</ul></li>
<li>Open a command prompt (Windows Key + R then type <code>cmd</code>).
<ul>
<li>Confirm installation by typing <code>ruby -v</code>.</li>
<li>The output should show the ruby version (e.g. <code>ruby 2.0.0p451 (2014-02-24) [x64-mingw32]</code>).</li>
</ul></li>
</ol>
<p>Continue with <a href="#install_bel_gem">Install the bel gem</a>.</p>
<h2>Install Ruby (Mac OSX)</h2>
<p><em>Option 1: Homebrew</em></p>
<ol>
<li>Install with homebrew by typing <code>brew install ruby</code>.</li>
<li>Add ruby commands to your PATH.
<ul>
<li>Add to .bash<em>profile.
<ul>
<li><code>echo 'export PATH="/usr/local/Cellar/ruby/VERSION/bin:$PATH"' >> .bash_profile</code></li>
</ul></li>
<li>Update environment by sourcing .bash</em>profile.
<ul>
<li><code>source ~/.bash_profile</code></li>
</ul></li>
</ul></li>
<li>Confirm installation by typing <code>ruby -v</code>.</li>
</ol>
<p><em>Option 2: rbenv</em></p>
<ul>
<li><p><em>Install with homebrew.</em></p>
<ul>
<li><code>brew update</code></li>
<li><code>brew install rbenv ruby-build</code></li>
<li>More details [here] (https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x).</li>
</ul></li>
<li><p><em>Install with git.</em></p>
<ul>
<li>Clone rbenv repository.
<ul>
<li><code>git clone https://github.com/sstephenson/rbenv.git ~/.rbenv</code></li>
</ul></li>
<li>Add to .bash_profile.
<ul>
<li><code>echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile</code></li>
</ul></li>
<li>Enable shims and autocompletion from the terminal.
<ul>
<li><code>echo 'eval "$(rbenv init -)"' >> ~/.bash_profile</code></li>
</ul></li>
<li>Clone ruby-build repository.
<ul>
<li><code>git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build</code></li>
</ul></li>
<li>More details [here] (https://github.com/sstephenson/rbenv#installation).</li>
</ul></li>
</ul>
<p>Continue with <a href="#install_bel_gem">Install the bel gem</a>.</p>
<h2>Install Ruby (Linux)</h2>
<p><em>Option 1: Install via package manager.</em></p>
<ul>
<li>Example installation with Ubuntu.
<ul>
<li>Type <code>sudo apt-get install ruby</code> in the terminal.</li>
</ul></li>
</ul>
<p><em>Option 2: rbenv</em></p>
<ul>
<li><em>Install with git.</em>
<ul>
<li>Clone rbenv repository.
<ul>
<li><code>git clone https://github.com/sstephenson/rbenv.git ~/.rbenv</code></li>
</ul></li>
<li>Add to .bash_profile.
<ul>
<li><code>echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile</code></li>
</ul></li>
<li>Enable shims and autocompletion from the terminal.
<ul>
<li><code>echo 'eval "$(rbenv init -)"' >> ~/.bash_profile</code></li>
</ul></li>
<li>Clone ruby-build repository.
<ul>
<li><code>git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build</code></li>
</ul></li>
<li>More details [here] (https://github.com/sstephenson/rbenv#installation).</li>
</ul></li>
</ul>
<p>Continue with <a href="#install_bel_gem">Install the bel gem</a>.</p>
<p><br><br></p>
<div id="install_bel_gem"></div>
<h2>Install the <em>bel</em> gem</h2>
<ol>
<li>Open a terminal or command prompt.</li>
<li>Use the <code>gem</code> command to install the <code>bel</code> gem.
<ul>
<li><code>gem install bel</code></li>
</ul></li>
<li>You should see the following:</li>
</ol>
<pre>
Fetching: bel-0.3.0.gem (100%)
Successfully installed bel-0.3.0
Parsing documentation for bel-0.3.0
Installing ri documentation for bel-0.3.0
1 gem installed
</pre>
<ol>
<li>Confirm you can access the <em>bel</em> command by type <code>bel</code> followed by the Enter/Return key.</li>
<li>Continue with <a href="#upgrading_bel">Upgrading BEL</a>.</li>
</ol>
<p><br><br></p>
<div id="upgrading_bel"></div>
<h2>Upgrading BEL</h2>
<ol>
<li>Type <code>bel upgrade help</code> for details on the upgrade command.</li>
<li>Run command
<ul>
<li>Example 1 - convert a BEL file
<ul>
<li>`bel upgrade --bel small<em>corpus.bel --changelog "http://resource.belframework.org/belframework/20150611/change</em>log.json"</li>
</ul></li>
<li>Example 2 - convert BEL from standard in
<ul>
<li><code>curl "http://resource.belframework.org/belframework/20131211/knowledge/small_corpus.bel" | bel upgrade --changelog "http://resource.belframework.org/belframework/20150611/change_log.json"</code></li>
</ul></li>
<li>More details [here] (https://github.com/OpenBEL/bel.rb).</li>
</ul></li>
<li>The upgraded BEL will be written to standard out. Simply redirect to a file after that.
<ul>
<li><code>bel upgrade ... > upgraded-version.bel</code></li>
</ul></li>
</ol>
<p><br><br></p>
<h2>Issues</h2>
<ul>
<li>If you have questions with <code>bel upgrade</code> or the <code>bel</code> gem please post to the [openbel-discuss] (https://groups.google.com/forum/#!forum/openbel-discuss) google group.</li>
<li>If you encounter errors please post an issue to [github issues] (https://github.com/OpenBEL/bel.rb/issues).</li>
</ul>