Skip to content

Commit 463f857

Browse files
committed
Downgraded ruby version to 2.3.0. The version 2.5.5 fails when loading the scripts, it has a memory leak on loading the script.
1 parent 5212f69 commit 463f857

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ This section describes all programming languages that **METACALL** supports, if
9494
| [NodeJS](https://nodejs.org/) | [N API](https://nodejs.org/api/n-api.html) | **>= 8.11.1<sup>†</sup> <= 10.16.3** | node |
9595
| [JavaScript](https://developer.mozilla.org/bm/docs/Web/JavaScript) | [V8](https://v8.dev/) | **5.1.117** | js |
9696
| [C#](https://dotnet.microsoft.com/) | [NetCore](https://github.com/dotnet/docs/blob/master/docs/core/tutorials/netcore-hosting.md) | **>= 1.0.0-preview2 <= 2.2.8** | cs |
97-
| [Ruby](https://ruby-lang.org/) | [Ruby C API](https://silverhammermba.github.io/emberb/c/) | **>= 2.1 <= 2.5** | rb |
97+
| [Ruby](https://ruby-lang.org/) | [Ruby C API](https://silverhammermba.github.io/emberb/c/) | **>= 2.1 <= 2.3** | rb |
9898
| [File](/source/loaders/file_loader) | **** | **0.1.0** | file |
9999
| [Mock](/source/loaders/mock_loader) | **** | **0.1.0** | mock |
100100

tools/metacall-environment.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,27 @@ sub_python(){
9999
sub_ruby(){
100100
echo "configure ruby"
101101
cd $ROOT_DIR
102+
103+
# TODO: Remove this when using ruby2.5 (not available yet because it fails on loading a script with a malloc error)
104+
$SUDO_CMD mv /etc/apt/sources.list /etc/apt/sources.list.backup
105+
$SUDO_CMD sh -c "echo \"deb http://ftp.debian.org/debian/ stretch main\" > /etc/apt/sources.list"
106+
$SUDO_CMD sh -c "echo \"deb-src http://ftp.debian.org/debian/ stretch main\" >> /etc/apt/sources.list"
107+
$SUDO_CMD sh -c "echo \"deb http://security.debian.org/debian-security stretch/updates main\" >> /etc/apt/sources.list"
108+
$SUDO_CMD sh -c "echo \"deb-src http://security.debian.org/debian-security stretch/updates main\" >> /etc/apt/sources.list"
109+
$SUDO_CMD sh -c "echo \"deb http://ftp.debian.org/debian/ stretch-updates main\" >> /etc/apt/sources.list"
110+
$SUDO_CMD sh -c "echo \"deb-src http://ftp.debian.org/debian/ stretch-updates main\" >> /etc/apt/sources.list"
111+
102112
$SUDO_CMD apt-get update
103-
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev ruby2.5-dev
113+
#$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends --allow-remove-essential install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev ruby2.5 libruby2.5 ruby2.5-dev
114+
$SUDO_CMD apt-get $APT_CACHE_CMD -y --no-install-recommends --allow-remove-essential --allow-downgrades install libgmp10=2:6.1.2+dfsg-1 libgmp-dev libncurses5 libtinfo5 ruby2.3 libruby2.3 ruby2.3-dev
104115

105116
# TODO: Review conflict with NodeJS (currently rails test is disabled)
106117
#curl -sL https://deb.nodesource.com/setup_4.x | $SUDO_CMD bash -
107118
#$SUDO_CMD apt-get -y --no-install-recommends install nodejs
108119
#$SUDO_CMD gem install rails
120+
121+
# TODO: Remove this when using ruby2.5 (not available yet because it fails on loading a script with a malloc error)
122+
$SUDO_CMD mv /etc/apt/sources.list.backup /etc/apt/sources.list
109123
}
110124

111125
# RapidJSON

tools/metacall-runtime.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,23 @@ sub_python(){
6060
sub_ruby(){
6161
echo "configure ruby"
6262
cd $ROOT_DIR
63-
sub_apt_install_hold ruby2.5 libruby2.5
63+
64+
# TODO: Remove this when using ruby2.5 (not available yet because it fails on loading a script with a malloc error)
65+
$SUDO_CMD mv /etc/apt/sources.list /etc/apt/sources.list.backup
66+
$SUDO_CMD sh -c "echo \"deb http://ftp.debian.org/debian/ stretch main\" > /etc/apt/sources.list"
67+
$SUDO_CMD sh -c "echo \"deb-src http://ftp.debian.org/debian/ stretch main\" >> /etc/apt/sources.list"
68+
$SUDO_CMD sh -c "echo \"deb http://security.debian.org/debian-security stretch/updates main\" >> /etc/apt/sources.list"
69+
$SUDO_CMD sh -c "echo \"deb-src http://security.debian.org/debian-security stretch/updates main\" >> /etc/apt/sources.list"
70+
$SUDO_CMD sh -c "echo \"deb http://ftp.debian.org/debian/ stretch-updates main\" >> /etc/apt/sources.list"
71+
$SUDO_CMD sh -c "echo \"deb-src http://ftp.debian.org/debian/ stretch-updates main\" >> /etc/apt/sources.list"
72+
73+
$SUDO_CMD apt-get update
74+
# sub_apt_install_hold ruby2.5 libruby2.5
75+
$SUDO_CMD apt-get -y install --no-install-recommends --allow-remove-essential libncurses5 libtinfo5 ruby2.3 libruby2.3
76+
$SUDO_CMD apt-mark hold libncurses5 libtinfo5 ruby2.3 libruby2.3
77+
78+
# TODO: Remove this when using ruby2.5 (not available yet because it fails on loading a script with a malloc error)
79+
$SUDO_CMD mv /etc/apt/sources.list.backup /etc/apt/sources.list
6480
}
6581

6682
# NetCore

0 commit comments

Comments
 (0)