Ruby 1.9.2 + rails 10.4 Development Environment configuration in Ubuntu 3.0

Source: Internet
Author: User
Tags sqlite database
ArticleDirectory
    • 1. Install the Ruby interpreter
    • 2. Install the rails programming framework
    • 3. Install passpsenger and nginx


If you want to learn rails without MacProgramFor members, Ubuntu is the best choice. Unfortunately, the UBUNTU World lacks the legendary text editor textmate and, in fact, the best image editor Photoshop, fortunately, Emacs and gimp have completely met all the needs of my lame programmer and amateur artist. Don't worry, we are not alone at all, because Sam Ruby, a collaborator of agile web development with rails, is also using ubuntu.



Installing the rails Development Environment on Ubuntu involves three steps:


    1. Install the Ruby interpreter;
    2. Install the rails programming framework;
    3. Install the Rails Web server.


These steps are actually very simple. I don't know why the instructions on the Internet are so complicated. Let's get started!


1. Install the Ruby interpreter


The C language compiler is required during the installation process. We will install a full set of compilation tools while installing Ruby.


$ Sudo apt-Get build-essential

$ Wget http: // http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2

 

$ Tar xvzf ruby-1.9.2-p0.tar.bz2

 

$ Ruby-1.9.2-p0 CD

 

$./Configure-Prefix =/usr/local/Ruby # specify the installation path

 

$ Make & make install

 

$ Sudo ln-S/usr/local/Ruby/bin/Ruby/usr/bin/Ruby

 

$ Sudo ln-S/usr/local/Ruby/bin/gem/usr/local/gem

 

#1.9.2 the package contains rubygems and you do not need to install it yourself. You can check whether Ruby-V and gem-V have been installed successfully.


 


2. Install the rails programming framework


The rails framework is written in ruby, so we use the rubygems Package Manager to install it.


$ Sudo gem install rails


When developing a rails program, we also need to use the SQLite database.


 



$ Sudo apt-Get install sqlite3 libsqlite3-dev $ sudo gem install sqlite3-ruby
3. Install passpsenger and nginx
 



$ Sudo gem install passenger

 

$ Passenger-install-nginx-Module

 

# There are prompts for each step. Follow the prompts.


After the installation is complete (my installation in the/usr/local/nginx directory)




$/Usr/local/nginx/sbin/nginx # Start nginx





$/Usr/local/nginx/sbin/nginx-s stop # Stop nginx




 




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.