Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 5678 Bytes
1 | How to use the Typo Rails installer |
2 | =================================== |
3 | |
4 | Typo 4.0 includes an installer that makes it easy to install Typo. |
5 | |
6 | Quick Start |
7 | ----------- |
8 | |
9 | Here's the short version: |
10 | |
11 | $ gem install typo |
12 | $ typo install /var/www/my_typo_site |
13 | |
14 | |
15 | Prerequisites |
16 | ------------- |
17 | |
18 | You'll need the following software installed on your system: |
19 | |
20 | 1. Ruby 1.8.4 |
21 | 2. RubyGems (http://www.rubygems.org) |
22 | 3. SWIG (http://www.swig.org) |
23 | 4. SQLite 3 |
24 | |
25 | Most modern Unix systems should have all four of these easily available in |
26 | pre-built form. |
27 | |
28 | |
29 | Installing Typo |
30 | --------------- |
31 | |
32 | 1. Install the Typo GEM. |
33 | |
34 | Run 'gem install typo'. This will install the current version of Typo |
35 | along with all dependencies. |
36 | |
37 | 2. Create a working Typo installation in a directory somewhere. |
38 | |
39 | Run 'typo install DIRECTORY'. Replace DIRECTORY with the name of the |
40 | directory that you want Typo to live in. This will copy all of Typo's |
41 | files into DIRECTORY, create a new database for Typo to use, and start |
42 | Typo running on a random port number. |
43 | |
44 | 3. Verify that Typo works for you. The installer will print a URL at the end |
45 | of the installation process; load it in a browser to test out Typo. |
46 | |
47 | 4. Once you're happy with Typo's configuration, follow the directions in |
48 | installer/apache.conf.example to run your Typo installation under Apache. |
49 | |
50 | |
51 | Upgrading Typo |
52 | -------------- |
53 | |
54 | The Typo installer can upgrade an existing installer-created Typo install by |
55 | simple running 'typo install DIRECTORY'. The installer will automatically |
56 | detect that it's upgrading an existing install and will attempt to preserve |
57 | the existing configuration as much as possible. |
58 | |
59 | |
60 | Starting and Stopping Typo |
61 | -------------------------- |
62 | |
63 | To stop Typo from running, run `typo stop /path/to/typo`. To restart it, run |
64 | `typo start /path/to/typo`. Since this Typo install uses Mongrel, not FastCGI, |
65 | you can't depend on your web server restarting it automatically on reboot. |
66 | You'll need to either create an init script or cron reboot entry to restart |
67 | it, depending on your host and/or privilege level. |
68 | |
69 | Ask your hosting provider or the Typo mailing list (typo-list@rubyforge.org) |
70 | if you need help with this. |
71 | |
72 | |
73 | Configuration Variables |
74 | ----------------------- |
75 | |
76 | Each Typo installation maintains a list of configuration variables. To see |
77 | the list for an existing install, run 'typo config DIRECTORY'. You can change |
78 | them via 'typo config DIRECTORY name1=value1 name2=value2...' For example: |
79 | |
80 | typo config /var/www/typo web-server=mongrel_cluster |
81 | |
82 | Here's a list of available configuration variables in Typo 4.0.0: |
83 | |
84 | ### bind-address |
85 | |
86 | The `bind-address` controls which IP address(es) Mongrel uses. By default, |
87 | Mongrel listens for connections on all IP addresses that are in use on the |
88 | server. You can restrict this by setting `bind-address`. The most useful |
89 | setting is probably `bind-address=127.0.0.1`, which will tell Mongrel to only |
90 | listen to connections from the local server. |
91 | |
92 | ### database |
93 | |
94 | The `database` variable controls which Database driver Typo uses. By default, |
95 | this is `sqlite`. Setting it to any other value will supress SQLite-specific |
96 | upgrade and maintenance commands. |
97 | |
98 | ### port-number |
99 | |
100 | The `port-number` variable controls which TCP port Mongrel uses. By default, |
101 | it's a random number between 4000 and 5000. |
102 | |
103 | ### rails-environment |
104 | |
105 | This controls which Rails environment Typo uses. This defaults to |
106 | `production`; the other usable value is `development`. |
107 | |
108 | ### threads |
109 | |
110 | The `threads` variable controls how many copies of Mongrel are used when using |
111 | the `mongrel_cluster` web server. Each thread listens on its own port number, |
112 | so setting `threads=2` while `port-number` is 4000 will make mongrel-cluster |
113 | run two copies of Mongrel, one listening on port 4000 and one on 4001. |
114 | |
115 | ### url-prefix |
116 | |
117 | The `url-prefix` variable is used to tell Typo to run in a subdirectory |
118 | instead of the root of a specific URL hostname. For example, if you want Typo |
119 | to live at http://blog.example.com/blog instead of http://blog.example.com/, |
120 | then you'd need to set `url-prefix=/blog`. |
121 | |
122 | ### web-server |
123 | |
124 | The `web-server` variable controls which server Typo uses. By default, |
125 | `web-server` is `mongrel`, but you can change it to `mongrel-cluster` or |
126 | `external`. If you use `external`, then 'typo PATH start` won't start a web |
127 | server of its own, and you'll have to provide your own web server. This is the |
128 | easiest way to use Typo with FastCGI--just set `web-server=external` and then |
129 | tweak `.htaccess`. |
130 | |
131 | |
132 | Troubleshooting |
133 | --------------- |
134 | |
135 | ### Tests fail with ID=0 |
136 | |
137 | You didn't install Swig before installing `sqlite3-ruby`. Uninstall the SQLite |
138 | driver, install Swig, and then re-install `sqlite3-ruby`. |
139 | |
140 | ### SQLite dies with "unsupported file format" |
141 | |
142 | You have multiple versions of SQLite3 installed, and you're using the command-line tool from one with the library from the other. Most likely this is on OS X with Darwinports. Make sure that `/opt/local/bin` is ahead of `/usr/bin` in your path. |
143 | |
144 | ### MySQL fails with timeout errors |
145 | |
146 | Install the MySQL GEM. It's faster then Rails' default MySQL driver, and it |
147 | works substantially better. |
148 | |
149 | ### Typo crashes randomly |
150 | |
151 | First, try running Typo under Webrick in the foreground to see if you can |
152 | reproduce the problem. Run `RAILS_ENV=production ./script/server webrick` from |
153 | your Typo directory and then see if you can get it to crash. If it dies, then |
154 | open a Trac ticket (http://typosphere.org/trac) describing the problem and |
155 | include the crash message along with any relevant information from the logs. |
156 | Also include which version of Ruby (ruby -v), Rails, and Typo, and which OS |
157 | you're using. |
158 | |
159 | Generally, if Typo suddenly exiting, it's probably caused by a bad Ruby |
160 | interpreter on your system. |