zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    ORA-12560:TNS:协议适配器错误解决方法
    Linux安装Oracle报Checking operating system version must be redhat3, SuSE9, redhat4, UnitedLin
    The web application created a ThreadLocal with key of type [null] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@1807b9
    Red Hat Enterprise Linux 5安装Oracle10
    Dispatcher initialization failed解决办法
    oui 报错 i386 libawt.so libXp.so.6
    struts2中OGNL中访问静态方法
    超炫无比 10个免费的jQuery相册(附下载)
    ubuntu linux启用root帐户
    linux 下安装eclipse无法启动,找不到jdk的解决办法
  • 原文地址:https://www.cnblogs.com/luomingchuan/p/3419306.html
Copyright © 2011-2022 走看看