Title: Setting up a Rails Development Server
1Setting up a Rails Development Server
2Development Environment
- Ubuntu 5.10
- Ruby 1.8.4 / Ruby Gems
- MySQL 5
- Rails 1.1.2
- Lighttpd a.k.a. Lighty
- Subversion
3Ubuntu 5.10
4Why Choose Ubuntu 5.10
- Good documentation
- Apt-get and synaptic package manager
- Strong device support
- No viruses
- Easy to install ruby and rails!
5Installing Ubuntu 5.10
- Download and burn the latest iso image
- When you get to the installation prompt, hit
enter - Wait a bit for the install to finish
- Ready for customization
6Customizing your install
- /etc/apt/sources.list
- Uncomment the universe repository
- deb http//de.archive.ubuntu.com/ubuntu/ dapper
main restricted - deb http//de.archive.ubuntu.com/ubuntu/ dapper
universe multiverse - Turn on ssh access to the server
- apt-get install openssh-server
7Created /etc/apt/preferences with
- Package
- Pin release abreezy, v5.10
- Pin-Priority 900
- Package
- Pin release abreezy-security, v5.10
- Pin-Priority 900
- Package
- Pin release abreezy-updates, v5.10
- Pin-Priority 900
- Package
- Pin release adapper
- Pin-Priority 90
8Additional Packages
- apt-get install gcc g libtool libreadline5
libreadline5-dev zlib1g-dev libssl-dev
libgdbm-dev libgdbm3 libgdbm-dev zlibc zlib-bin
libmysqlclient14-dev subversion subversion-tools
libsvn0-dev libsvn0 xtail rrdtool mysql-server
mytop make
9Ruby 1.8.4 and Ruby Gems
10Installing Ruby 1.8.4
- apt-get install -t dapper irb irb1.8
libpgsql-ruby1.8 libreadline-ruby1.8
libredcloth-ruby1.8 libruby libruby1.8
libyaml-ruby ruby1.8-examples rdoc1.8 ri1.8
libmysql-ruby1.8 libgdbm-ruby1.8 imagemagick
librmagick-ruby1.8 librmagick-ruby-doc xml-core
libmysqlclient14-dev - sudo ln -s /usr/bin/ruby1.8 /usr/local/bin/ruby
- sudo ln -s /usr/bin/ri1.8 /usr/local/bin/ri
- sudo ln -s /usr/bin/rdoc1.8 /usr/local/bin/rdoc
11Installing Ruby Gems
- Download rubygems
- Do sudo ruby setup.rb" in the source directory.
- sudo gem update include-dependencies
12MySQL 5
13Why Choose MySQL
- Easy to use and develop for
- Lots of good documentation
- Most hosting providers provide it free
14Installing MySQL
- apt-get install -t dapper mysql-server
mysql-client mytop - Set mysql password to foo
- sudo mysqladmin -u root password foo
15Rails 1.1.2
16Installing Rails 1.1.2
- sudo gem install rails --include-dependencies
17Lighttpd a.k.a. Lighty
18Why Choose Lighty
- FastCGI
- Virtual hosts
- Fast and secure application controlled downloads
- Works on Linux, Unix and Windows
- Flexible and configurable
- Good docs and support
19Installing Lighty
- apt-get install libfcgi-dev libfcgi-ruby
- apt-get install libpcre3 libpcre3-dev bzip2
libbz2-dev - wget http//www.lighttpd.net/download/lighttpd-1.4
.11.tar.gz - tar xvzf lighttpd-1.4.11.tar.gz
- ./configure
- time make
- sudo make install
20Subversion
21Why Versioning is Good
- Online backups
- The oh shit factor
- Supports multiple developers
- Mac Subversion
- Windows Subversion / Tortoise SVN
- Most rails hosting companies have it built-in
22Configuring Subversion
- adduser repouser
- Log in as repouser
- mkdir repouser/sources
- svnadmin create repouser/sources
- Edit the configuration file to change the access
rules. Set repouser/sources/conf/svnserve.conf
23Subversion continued
- general
- anon-access read
- auth-access write
- realm YourName Rails Repouser
- password-db passwd
24Setting up the repository
- mkdir -p foo/yourapp
- mkdir -p foo/ yourapp/trunk
- mkdir -p foo/ yourapp/branches
- mkdir -p foo/ yourapp/tags
- cd foo
- svn import . file///home/repository/sources
25Results
26What we got
- A ready to go, stable and robust rails
development server that supports multiple
developers on mixed platforms
27Conclusions
28Life is good!
- Easy and worth it
- Took about 10 minutes to install
- Can use it to show clients your progress or for
in-house testing
29Resources
30Resource List
- Ubuntu 5.10
- http//www.ubuntu.com
- Ruby 1.8.4 / Ruby Gems
- http//www.ruby-lang.org
- http//rubyforge.org
- MySQL 5
- http//www.mysql.com
- Rails 1.1.2
- http//www.rubyonrails.org
- Lighttpd a.k.a. Lighty
- http//www.lighttpd.net
- Subversion
- http//subversion.tigris.org
31Thank You!