8784: Fix test for latest firefox.
[arvados.git] / doc / _includes / _install_rails_command.liquid
1 {% comment %}
2 This template recognizes four variables:
3 * railshost: The hostname included in the prompt, to let the user know where to run the command.  If this is the empty string, no hostname will be displayed.  Default "apiserver".
4 * railsdir: The directory included in the prompt, to let the user know where to run the command.  Default "/var/www/arvados-api/current".
5 * railscmd: The full command to run.  Default "bundle exec rails console".
6 * railsout: The expected output of the command, if any.
7 {% endcomment %} Change *@webserver-user@* to the user that runs your web server process.  If you install Phusion Passenger as we recommend, this is *@www-data@* on Debian-based systems, and *@nginx@* on Red Hat-based systems.
8
9 {% unless railshost %}
10   {% assign railshost = "apiserver" %}
11 {% endunless %}
12
13 {% unless (railshost == "") or (railshost contains ":") %}
14   {% capture railshost %}{{railshost}}:{% endcapture %}
15 {% endunless %}
16
17 {% unless railsdir %}
18   {% assign railsdir = "/var/www/arvados-api/current" %}
19 {% endunless %}
20
21 {% unless railscmd %}
22   {% assign railscmd = "bundle exec rails console" %}
23 {% endunless %}
24
25 Using RVM:
26
27 <notextile>
28 <pre><code>{{railshost}}~$ <span class="userinput">cd {{railsdir}}</span>
29 {{railshost}}{{railsdir}}$ <span class="userinput">sudo -u <b>webserver-user</b> RAILS_ENV=production `which rvm-exec` default {{railscmd}}</span>
30 {% if railsout %}{{railsout}}
31 {% endif %}</code></pre>
32 </notextile>
33
34 Not using RVM:
35
36 <notextile>
37 <pre><code>{{railshost}}~$ <span class="userinput">cd {{railsdir}}</span>
38 {{railshost}}{{railsdir}}$ <span class="userinput">sudo -u <b>webserver-user</b> RAILS_ENV=production {{railscmd}}</span>
39 {% if railsout %}{{railsout}}
40 {% endif %}</code></pre>
41 </notextile>