Create your blog with TYPO
Posted by superuser
a Ruby On Rails app
In this article you can find how to install & create your blog with Typo (v. 4.1.1) easily in a few steps. The only requirement is that you have already installed on your machine Ruby, Ruby on rails and some required gems by typo (mongrel, mysql, mysql, rcov, rspec, xmpp4r, flexmock, hoe, ruby-debug and ruby-debug-base). My local gem reports the following packages (with version):
*** LOCAL GEMS *** actionmailer (1.3.6) actionpack (1.13.6) actionwebservice (1.2.6) activerecord (1.15.6) activeresource (2.1.0) activesupport (1.4.4) cgi_multipart_eof_fix (2.5.0) cmdparse (2.0.2) columnize (0.1) daemons (1.0.10) ezcrypto (0.7) fastercsv (1.2.3) fastthread (1.0.1) flexmock (0.8.2) gem_plugin (0.2.3) highline (1.4.0) hoe (1.5.3) linecache (0.43) mime-types (1.15) mini_magick (1.2.3) mongrel (1.1.5) mongrel_cluster (1.0.5) mysql (2.7) rails (1.2.6) rake (0.8.1) rcov (0.8.1.2.0) rspec (1.1.4) ruby-debug (0.10.1) ruby-debug-base (0.10.1) rubyforge (1.0.0) rubygems-update (1.1.1) sources (0.0.2) xmpp4r (0.3.2)As you can see i use rails v. 1.2.6 and this is main reason that i use the 4.1.1 version of Typo (the last Typo version is 5.0.3 and is fully documented on the official site of Typo, but you'll need RoR 2.x version.
Let's start building our Typo-4.1.1 blog:
$ fetch http://rubyforge.org/frs/download.php/20466/typo-4.1.1.tgz
$ cd my-rails-work-dir
$ tar -zxvf typo-4.1.1.tgz
$ mv typo-4.1.1 MyWonderfulBlogThat's it. Now i'm ready to configure in a few step my new blog. All work will be done inside MyWonderfulBlog directory.
$ cp database.yml.example database.ymlThe app is already developed so you can choose to work directly in production environment. Truely, there is no need to select development, but if you do so, there is always an easy way to switch from development in production environment. If you prefer to work in development environment In the following description just replace prod with dev.
production: adapter: mysql encoding: utf8 database: wonderfulblog_prod username: safesql password: mysqlko9 socket: /tmp/mysql.sockNote: I use freebsd (is a unix system) so maybe the socket /tmp/mysql.sock could be different in your case.
$ mysqladmin -u root -p create wonderfulblog_prod Enter password: [enter your mysql root password here]...and it's done.
$ mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is xxx Server version: 5.0.51a FreeBSD port: mysql-server-5.0.51a Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> grant all privileges on wonderfulblog_prod.* to 'safesql'@'localhost' identified by 'mysqlko9'; Query OK, 0 rows affected (0.09 sec) mysql> flush privileges; Query OK, 0 rows affected (0.05 sec) mysql> \q Bye
$ rake migrate RAILS_ENV='production'(note: in development environment use simply "rake migrate") Rake will extract all necessary items in your database.
$ mongrel_rails start -d -p 8921 -e production
After that you can access the administration interface ( http://localhost:8921/admin ), and view the results in http://localhost:8921 .
In the next article i'll see you how i manage the interface. Until then have a good time!





