FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
discourse/script/switch_container_ruby at master · stackshareio/discourse · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
stackshareio
/
discourse
Public
forked from
discourse/discourse
Notifications
You must be signed in to change notification settings
Fork
3
Star
2
Code
Pull requests
1
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
discourse
/
script
/
switch_container_ruby
Copy path
More file actions
More file actions
Latest commit
History
History
History
52 lines (39 loc) · 1022 Bytes
Breadcrumbs
discourse
/
script
/
switch_container_ruby
Copy path
File metadata and controls
52 lines (39 loc) · 1022 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/bash
#
use this command to switch the running version of Ruby
set
-e
old_pwd=
`
pwd
`
if
[[
-z
"
$1
"
||
(
!
-z
"
$2
"
&&
!
-f
"
$2
"
) ]]
;
then
echo
"
Usage: switch_container_ruby VERSION PATCH_FILE
"
exit
1
;
fi
if
[
!
-f
/VERSION ]
;
then
echo
"
Script is intended to be executed from inside the official docker container only!
"
exit
1
;
fi
sv stop unicorn
cd
/src
git clone https://github.com/sstephenson/ruby-build.git
cd
/src/ruby-build
./install.sh
cd
/
rm -rf /src/ruby-build
rm -f /usr/local/bin/rake
rm -f /usr/local/bin/ruby
rm -f /usr/local/bin/ri
rm -f /usr/local/bin/rdoc
rm -f /usr/local/bin/gem
rm -f /usr/local/bin/erb
rm -f /usr/local/bin/bundle
rm -f /usr/local/bin/bundler
if
[[
-z
"
$2
"
]]
;
then
ruby-build
$1
/usr/local
else
cd
$old_pwd
(ruby-build
$1
/usr/local -p
<
$2
)
fi
gem update --system
gem install bundler --force
cd
/var/www/discourse
su discourse -c
'
bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4
'
sv start unicorn
cd
$pwd
Back
|
FazBrowse Home
|
New Git URL