Install Rails on ubuntu 12.04 LTS
2013-11-12 12:58
423 查看
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.
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.
相关文章推荐
- How to Install Ruby on Rails on Ubuntu 12.04 LTS (Precise Pangolin) with RVM
- Install Ruby on Rails on Ubuntu 12.04 LTS
- Install Ruby on Rails on Ubuntu 12.04 LTS
- Install Ruby on Rails on Ubuntu 12.04 LTS
- Ruby on Rails Session 2: How to install Aptana Studio 3 on Ubuntu 12.04 LTS
- Install Apache 2.4.2 on Ubuntu 12.04 LTS
- How to install OpenERP 7.0 on Ubuntu 12.04 LTS
- How to install OpenERP 7.0 on Ubuntu 12.04 LTS
- Install OpenCV 2.4.2 on Ubuntu 12.04 LTS
- How to install Aptana Studio 3 on Ubuntu 12.04 LTS (Precise Pangolin)
- ubuntu_Install Android SDK on Ubuntu 12.04 LTS
- How to Use Memcached With Ruby on Rails on Ubuntu 12.04 LTS
- Install ruby on rails in Ubuntu 12.04
- How to install/setup latest version of PHP 5.5 on Ubuntu 12.04 LTS (Precise Pangolin)
- 看看一个小时能Install CUDA 5 on Ubuntu 12.04 LTS
- Install CMake on Ubuntu 12.04
- Ubuntu 12.04,配置Ruby on Rails开发环境
- Ubuntu 12.04搭建Ruby on Rails开发环境
- install Python 3.3 on Ubuntu 12.04
- Vim的Python编辑器详细配置过程 (Based on Ubuntu 12.04 LTS)