Setting up a Rails Development Server

1 / 31
About This Presentation
Title:

Setting up a Rails Development Server

Description:

Installing Ubuntu 5.10. Download and burn the latest iso image ... deb http://de.archive.ubuntu.com/ubuntu/ dapper main restricted ... – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 32
Provided by: robertd107

less

Transcript and Presenter's Notes

Title: Setting up a Rails Development Server


1
Setting up a Rails Development Server
  • Robert Dempsey Joe Block

2
Development Environment
  • Ubuntu 5.10
  • Ruby 1.8.4 / Ruby Gems
  • MySQL 5
  • Rails 1.1.2
  • Lighttpd a.k.a. Lighty
  • Subversion

3
Ubuntu 5.10
4
Why Choose Ubuntu 5.10
  • Good documentation
  • Apt-get and synaptic package manager
  • Strong device support
  • No viruses
  • Easy to install ruby and rails!

5
Installing 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

6
Customizing 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

7
Created /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

8
Additional 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

9
Ruby 1.8.4 and Ruby Gems
10
Installing 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

11
Installing Ruby Gems
  • Download rubygems
  • Do sudo ruby setup.rb" in the source directory.
  • sudo gem update include-dependencies

12
MySQL 5
13
Why Choose MySQL
  • Easy to use and develop for
  • Lots of good documentation
  • Most hosting providers provide it free

14
Installing MySQL
  • apt-get install -t dapper mysql-server
    mysql-client mytop
  • Set mysql password to foo
  • sudo mysqladmin -u root password foo

15
Rails 1.1.2
16
Installing Rails 1.1.2
  • sudo gem install rails --include-dependencies

17
Lighttpd a.k.a. Lighty
18
Why Choose Lighty
  • FastCGI
  • Virtual hosts
  • Fast and secure application controlled downloads
  • Works on Linux, Unix and Windows
  • Flexible and configurable
  • Good docs and support

19
Installing 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

20
Subversion
21
Why 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

22
Configuring 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

23
Subversion continued
  • general
  • anon-access read
  • auth-access write
  • realm YourName Rails Repouser
  • password-db passwd

24
Setting 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

25
Results
26
What we got
  • A ready to go, stable and robust rails
    development server that supports multiple
    developers on mixed platforms

27
Conclusions
28
Life 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

29
Resources
30
Resource 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

31
Thank You!
Write a Comment
User Comments (0)