• 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.

  • 相关阅读:
    天梯程序设计竞赛 L2-005. 集合相似度 STL
    Oulipo kmp
    剪花布条 kmp
    poj 1321 dfs
    蓝桥杯历届试题 打印十字图
    windows 10家庭版安装SQL Server 2014出现.net 3.5失败问题解决。
    使用分区助手转移windows 10系统出现黑屏boot manager报错问题。
    使用java AWT做一个增加按钮的简单菜单窗体
    R基本画图
    R的基础学习之数据结构
  • 原文地址:https://www.cnblogs.com/luomingchuan/p/3419306.html
Copyright © 2020-2023  润新知