Merb 0.9.2, DataMapper, nginx on Fedora 8
Posted in Bryan's Blog at 09:55AM on 04/13/2008

Here's how I got all of this running last night. The install went much more smoothly on an intel mac, but I still haven't been able to get it to play together (specifically the do_mysql gem) on ppc. Anyway, I'm sure there are better ways to configure nginx, but this was my first attempt.

Starting with a clean FC8 Install, I:

sudo yum install nginx git ruby ruby-devel ruby-libs irb ruby-mysql rubygems gcc-c++ mysql-devel

sudo gem install --remote rake

sudo gem install rspec erubis json_pure zentest rack mime-types merb_datamapper do_mysql mongrel rubigen -y

sudo gem install do_mysql -- --with-mysql=/usr/include/mysql/

gem install hpricot –source http://code.whytheluckystiff.net

Update: rake install on merb-more for me on this machine failed, so I instead ran  "sudo gem install merb --include-dependencies" and it worked fine. 

git clone git://github.com/wycats/merb-core.git
git clone git://github.com/wycats/merb-more.git
cd merb-core ; rake install ; cd ..
cd merb-more ; rake install ; cd ..


sudo /sbin/service mysqld start

mysql -u root
mysql> create database yourproj_dev;
mysql> create database yourproj_test;
mysql> create database yourproj_prod;

Now that the guts are all installed, do:

sudo /usr/sbin/nginx

Here's what my /etc/nginx/nginx.conf looks like. I only cared about my single merb app on this system, so I'm sure there are better ways to go about this. After you've setyour nginx.conf the way you want it, do:

sudo kill -HUP `cat /var/run/nginx.pid`

Then start your merb on the ports that your nginx is going to be looking for and you should be good to go.

Comments
(will not be displayed)
skippidydoo