Install Rails on ubuntu 12.04 LTS
There are basically there ways to install Rails development environment on your ubuntu linux system, here I used 12.04 LTS version, so first on ubuntu apt manage system, we should check what version it provide, typing:
So now we know that the latest version on ubuntu is 1.9.3, go to the rails official website we can see the recommended version is indeed this. so don't hesitate, just install it, using the super user, then we type:
After minutes, ruby has been installed on your machine, check if it's okay by typing:
Now we see the ruby has been correctly installed, then we are going to install rails, rails is just a gem package of ruby, here comes a question, what version should I install and how to control it, in fact, this way to install rails, we have little right to control version, if you want to control a very version, you should install ruby by using rvm(ruby version manager), that is another way I want to introduce in the future. but we can check first what version ubuntu have, we can install the already available version of rails, ok next step by typing:
you will find:
After this check, it's time to install it, typing:
Now we got the rails gem, we can do things with it now,
create a new folder in /home/gordon, create a rails folder, cd into it and typing:
it will install corresponding gem files such as rake,sqlite3,sass,uglifier etc. sometimes it will stuck at this period because this will download a lot, if it get stuck, just press control+C to stop it, cd into folder firstApp and typing,
Try to start the server, if you get stuck in the previous phase and you pressed control + C, I believe you will face many errors telling you some gem packages are missed, but don't panic, now you can just typing gem install to fix every problem, for example, if you miss sqlite3, you can fix by typing:
And at last, by fixing every problem, when you type rails server or rails s:
If you get this picture on your screen, congratulation! welcome to the rails world, prepare to realize your dreams!
I like this version's ruby and rails because I have been using it for a long time, but in the future, the version can change, so at that time, we will have to use the ruby version manager to control the version, althrough latest versions are always good, but when you are familiar with some thing, you may find it easy and intimate, so next blog I want to install rvm and then install rails.
Install Rails on ubuntu 12.04 LTS的更多相关文章
- Install Ruby on Rails on Ubuntu 12.04 LTS
1:Update package repository. sudo apt-get update 2:Install git and Curl. Git:是一个简单,快速,高效的版本控制系统. ...
- Installing OpenCV 2.4.10 in Ubuntu 12.04 LTS
转自 http://www.samontab.com/web/2012/06/installing-opencv-2-4-1-ubuntu-12-04-lts/ EDIT: I published a ...
- (转)Ubuntu 12.04 LTS 构建高可用分布式 MySQL 集群
本文的英文版本链接是 http://www.mrxuri.com/index.php/2013/11/20/install-mysql-cluster-on-ubuntu-12-04-lts.html ...
- MOUNT MACBOOK DISK (OSX / HFS+) ON UBUNTU 12.04 LTS WITH READ/WRITE
MOUNT MACBOOK DISK (OSX / HFS+) ON UBUNTU 12.04 LTS WITH READ/WRITE So you want to mount your HFS+ ( ...
- 【转】ubuntu 12.04 LTS将关闭最大化最小化移动到右上角
原文网址:http://www.4byte.cn/learning/114801.html ubuntu 12.04 LTS将关闭最大化最小化移动到右上角 还是按下“ALT +F2”组合键,输入g ...
- Ubuntu 12.04 LTS 构建高可用分布式 MySQL 集群
本文的英文版本链接是 http://xuri.me/2013/11/20/install-mysql-cluster-on-ubuntu-12-04-lts.html MySQL Cluster 是 ...
- 如何让Ubuntu 12.04 LTS更炫更具吸引力
Ubuntu 12.04 LTS震撼发布 适逢七周岁生日之际,Ubuntu正式推出了第四个LTS长期支持版本,开发代号Precise Pangolin的Ubuntu 12.04在2012年4月26 ...
- Ubuntu 12.04 LTS(64 bit) + RTL8188CU无线网卡驱动
. . . . . 之前家里台式机上安装的是win7+CentOS双系统,但是CentOs的无线网卡驱动不知为何无论如何都安装不上,再加上这段时间一直很忙,所以一直使用着win.这几天事情忙得差不多了 ...
- ubuntu 12.04 LTS server 中文乱码【转】
ubuntu 12.04 LTS server 中文乱码 最近装了一台ubuntu 12.04 server装完后是没有桌面的,后来又手动安装了桌面,但进行后发现桌面是乱码,应该是缺少字体在googl ...
随机推荐
- redis windows安装与使用
是什么 Redis(Remote Dictionary Server)远程字典服务器 开源免费 C语言编写的 key/value分布式内存数据库,基于内存运行 Redis支持数据的持久化,可以将内存中 ...
- OAuth2建立webapi认证服务供自己的客户端使用--密码模式
场景:你自己实现了一套webApi,想供自己的客户端调用,又想做认证. 第一步:通过vs2015建立web api项目,Startup.cs,这个类将会作为Owin的启动类. 第二步:在webapi. ...
- javascript中兄弟元素兼容封装
<script> //获取下一个兄弟元素 function getNextElement(element) { if (element.nextElementSibling) { retu ...
- IE8不支持响应式设计解决方法
下载并引入 respond.js 即可 为了针对IE8应用这段脚本,需要针对IE8的条件注释 <!--[if lt IE 9]> --- <! [endif]--> 为了不让并 ...
- SwipeRefreshLayout实现下拉刷新上滑加载
1. 效果图 2.RefreshLayout.java package myapplication.com.myapplication; import android.content.Context; ...
- Python爬虫:爬取糗事百科
网上看到的教程,但是是用正则表达式写的,并不能运行,后面我就用xpath改了,然后重新写了逻辑,并且使用了双线程,也算是原创了吧#!/usr/bin/python# -*- encoding:utf- ...
- dedecms清空栏目后,新建ID不从1开始的解决方法
在后台SQL运行器运行下面的语句,这样新建的栏目ID就从1开始了: ALTER TABLE `dede_arctype` AUTO_INCREMENT =1; (注意表名) 下面是文章的,运行后,发布 ...
- HDU 2955 Robberies【01背包】
解题思路:给出一个临界概率,在不超过这个概率的条件下,小偷最多能够偷到多少钱.因为对于每一个银行都只有偷与不偷两种选择,所以是01背包问题. 这里有一个小的转化,即为f[v]代表包内的钱数为v的时候, ...
- iOSUI显示思想
两级显示机制: 1.cpu: 2.GPU: 和操作系统的多级缓存机制有点类似.
- hook的本质就是在本原可执行文件中加东西
hook的本质就是在本原可执行文件中加东西. 本质就是添加东西: