Install memo on Ubuntu Server 10.04 + RoR
First download the Ubuntu Server 10.04 CD image, less than 700 mb. Then install. Only LAMP Server is selected for service installation.
The first thing after installation is to configure sshd-server. Sshd-Server is not installed on Ubuntu server by default, so you need to install it manually.
$ Sudo apt-get install openssh-server: Change the IP address to a fixed IP address.
$ Sudo vi/etc/network/interfaces
... (Omitted above )...
Auto eth0
Iface eth0 inet static
Address 192.168.0.10
Gateway 192.168.0.1
Netmask 255.255.255.0
Network 192.168.0.0
Broadcast 192.168.0.255
$ Sudo vi/etc/resolv. conf
Nameserver 192.168.0.1
$ Sudo/etc/init. d/networking restart so that you can use putty to connect.
Next, install webmin to facilitate management. Go to the webmin homepage to download the deb package. Version 1.510 is 13.83 MB.
$ Sudo dpkg-I the webmin_1.510-2_all.deb prompts a missing package and runs the following command:
$ Sudo apt-get-f install mod_python:
$ Sudo apt-get install libapache2-mod-python install ruby and RoR:
$ Sudo apt-get install ruby
$ Sudo apt-get install rubygems
$ Sudo apt-get install rails someone suggested using sudo gem install rails, but I had to go back to apt-get after running for an hour on the virtual machine.
Try to build a small project after installing rails:
$ Rails demo
$ Cd demo
$ Ruby script/server-B 0.0.0.0 found that when the browser accesses http: // 192.168.0.10: 3000, the first access may display a normal RoR image, and the second access may report an Internal Server Error, report "private method 'gsub! Called for # <Class: 0x7f2a674b0b98> "error. Check that you can solve this problem without changing the default WEBrick server to mongrel:
$ Sudo apt-get install mongrel after mongrel is installed, start the RoR server in the original mode.
$ Ruby script/server-B 0.0.0.0