注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

淘尽网 官方博客

淘尽网http://www.tao3w.com做最好的比价网站

 
 
 

日志

 
 
关于我

淘尽网 http://www.tao3w.com 做最好的比价网站,做最好的数据抓取专家。

网易考拉推荐

How To Install Ruby on Rails on CentOS 6  

2016-06-29 17:08:42|  分类: LINUX |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

About Ruby on Rails

Ruby on Rails is an application stack that provides web developers with a framework to quickly create a variety of web applications.

There are three separate processes required to install Ruby on Rails: you need to install Ruby, then the Ruby Gems, then Rails.

Set Up

The steps in this tutorial require the user to have root privileges. You can see how to set that up in theInitial Server Setup Tutorial in steps 3 and 4.

Step One—Install Ruby

The easiest way to install Ruby on your virtual server is through the yum package installer.

sudo yum install ruby

After you say yes to the prompt, Ruby will install.

Then we need some additional Ruby dependancies.

Type the following into terminal:

sudo yum install gcc g++ make automake autoconf curl-devel openssl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel
sudo yum install ruby-rdoc ruby-devel

While it processes, the prompt may ask your permission to install the various packages. Go ahead and say yes each time.

Step Two—Install Ruby Gems

Once you have Ruby installed, you can easily install the ruby gems.

Type this command into terminal:

sudo yum install rubygems

After you have agreed to the prompt, ruby gems should be installed on your VPS. However, if you have any issues with this process, you can use an alternate method to install the Ruby Gems.

How to Install RubyGems from Source

If, for some reason, the yum installer doesn’t work for you, you can follow these steps to install ruby gems from the source.

To start, we will create a new directory to store the ruby code.

sudo mkdir ~/src
sudo cd ~/src

Then we can go ahead and download the ruby gems into the new folder. (You can always access the latest available gems by visiting:

http://rubygems.org/pages/download)

wget http://rubyforge.org/frs/download.php/69365/rubygems-1.3.6.tgz?tar -zxvf rubygems-1.3.6.tgz
cd rubygems-1.3.6

Finally you are ready to install the ruby gems.

sudo ruby setup.rb

After you answer yes to the prompt, the gems will finish installing.

You will now be ready to install Rails on your virtual server.

Step Three—Install Rails

We should quickly do two updates to makes sure that everything is up-to date and set up correctly:

Check the gems:

sudo gem update

Then check the system overall:

sudo gem update --system

Once everything has processed, it is time to install Rails.

To start, open terminal and type in:

sudo gem install rails

This process may take a while, be patient with it.

If you are feeling especially antsy, you can type in:

sudo gem install rails -V

Terminal will then show you all the details of the process, so you can see that it is working.

After you answer yes to the prompt that comes up, rails will finish installing.

You have successfully installed Ruby on Rails!

  评论这张
 
阅读(43)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017