所以,我正在做一些挑战,我需要提供一个显示有关一系列事物的实时数据的仪表板。
决定使用潇洒的宝石作为红宝石(dashing.io),我已经设法在我的Windows PC上做到了,我已经学会了它的基础知识并且可以成功构建仪表板。
我已经获得了数据中心上2台服务器的访问权限,我可以通过VPN客户端访问该服务器,我认为这是在centOS上全新安装的apache 2。
如何继续在其中一台服务器上安装ruby,以便以后将其用作仪表板的网页?
我真的是初学者,但我需要这样做!
答案 0 :(得分:2)
Ok, even though you access through a VPN you haven't actually told us the means of access. But since you're on a Windows PC I assume you're either using Putty or some sort of remote desktop connection - with which you should open a terminal.
On CentOS you can do "yum install ruby" (use sudo if you get permissions denied). But last time I used CentOS it's repos were very old and ruby there was very outdated, so I recommend installing rvm https://rvm.io/rvm/install and then installing ruby through it (check the rubies installation page)
You can also go through the compile route, I've wrote a guide on it, actually targeting fresh CentOS machines, but it's 4 years old and for Ruby 1.9.3, you'll probably be able to follow the same instructions but changing the version to 2.x - probably: http://techblogthing.blogspot.co.uk/2012/11/complete-guide-to-install-ruby-193-on.html
答案 1 :(得分:0)
潇洒的gem文档假设你已经在你的环境中设置了一些东西,但在CentOS上你还需要ruby开发包和其他一些东西。在CentOS或RHEL上设置RVM可能是一场噩梦,尤其是如果您的新设置。
非RVM方法
<强> CentOS的强>
// generated example
function(t, b, c, d) {
var ts=(t/=d)*t;
var tc=ts*t;
return b+c*(63.2425*tc*ts + -185.23*ts*ts + 198.58*tc + -93.89*ts + 18.2975*t);
};
您还需要通过nodejs
的JS运行时yum install ruby
yum install ruby-devel
其他步骤是:
yum install curl
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
yum -y install nodejs
<强>的Ubuntu / Debian的强>
gem install dashing
gem install bundle
dashing new sweet_dashboard_project
cd sweet_dashboard_project
bundle
dashing start -p 80