Document directory
- 1. Install the Ruby interpreter
- 2. Install the Rails programming framework
- 3. Install passpsenger and nginx
Ruby 1.9.2 + rails 10.4 Development Environment configuration in ubuntu 3.0
Ubuntu is the ideal choice for programmers who do not have a Mac but want to learn Rails. 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:
- Install the Ruby interpreter;
- Install the Rails programming framework;
- 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.
View sourceprint?
$ sudo apt- get build-essential |
View sourceprint?
$ wget http: //http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2 <br> |
View sourceprint?
$ tar xvzf ruby-1.9.2-p0.tar.bz2 |
View sourceprint?
View sourceprint?
$./Configure-prefix =/usr/local/ruby # specify the installation path |
View sourceprint?
View sourceprint?
$ sudo ln -s /usr/local/ruby/bin/ruby /usr/bin/ruby |
View sourceprint?
$sudo ln -s /usr/local/ruby/bin/gem /usr/local/gem |
View sourceprint?
#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.
View sourceprint?
When developing a Rails program, we also need to use the SQLite database.
View sourceprint?
$ sudo apt- get install sqlite3 libsqlite3-dev |
$ sudo gem install sqlite3-ruby |
3. Install passenger and nginxview sourceprint?
$ sudo gem install passenger |
View sourceprint?
$ passenger-install-nginx-module |
View sourceprint?
# 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
Comment
2058760
#1 floor [main poster]
View sourceprint?
1 |
Openssl Solution not Found problems |
2 |
apt-get install libssl-dev |
3 |
apt-get install libopenssl-ruby |
View reply reference
#2 floor [main poster]
Initial appearance
No such file to load-zlib
###########################
Apt-get install zlib1g-dev
Apt-get install zlib1g
Cd ruby-1.9.2-p0/ext/zlib
Ruby extconf. rb
Make
Sudo make install
Sudo gem install rails
View reply reference
# [Main poster] on the third floor
Initial appearance
Rvmsudo passenger-install-nginx-module
The/etc/profile file is used.
PATH = $ PATH:/opt/nginx/sbin
Export PATH
REBOOT reply reference View
Original article in: http://www.cnblogs.com/viaivi/archive/2010/08/28/1811100.html