//install centOS6.0 from netinstall
//install all ruby
# sudo yum -y install ruby ruby-devel ruby-irb ruby-libs ruby-rdoc
# ruby -v
ruby 1.8.5 (2006-08-25) [i386-linux]
//install rubygems
# cd Download
# wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
# tar xzvf rubygems-1.3.5.tgz
# cd rubygems-1.3.5
# sudo ruby setup.rb
//install all needed stuff (if necessary)
# sudo yum -y install mysql-devel mysql-server httpd gcc make
//install the rails 2.3.8
# sudo gem install rails -v=2.3.8 --include-dependencies
//confirm versions
# ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
# gem -v
1.3.7
# rails -v
Rails 2.3.8
//stop firewall
$ sudo service iptables status
$ sudo service iptables stop
//start mysql server
$ sudo service mysqld start
$ sudo chkconfig mysqld on
$ sudo chkconfig --list
//install mysql connecter for ruby
$ sudo gem install mysql -- --with-mysql-config
//create database
$ mysql -uroot
mysql> create database demo_development;
//add a application using mysql as db
$ cd ~
$ mkdir work
$ cd work
$ rails demo -d mysql
//create the controller
$ cd demo
$ script/generate controller layout
//add a action
$ vi app/controllers/layout_controller.rb
---
add "def index"
add "end"
---
//start web server
$ ruby script/server
=> Booting WEBrick
=> Rails 2.3.8 application starting on http://0.0.0.0:3000
//confirm from browser url:http://localhost:3000
//if you see "Template is missing" you done
2011年11月2日水曜日
install ruby on rails development evn on centos6.0 memory
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿