Upate Ruby Gems on Mac OS X 10.5 Article
This nice article describes how to update Ruby Gems on Mac OS X Leopard 10.5:
This nice article describes how to update Ruby Gems on Mac OS X Leopard 10.5:
Git Cloning and Git Forking differences are described in this article
Cloning is to make a copy of a remote repository into your local development environment.
Forking is to clone an entire remote repository into another remote repository.
This article guides you through the process of creating a Ruby on Rails application using Passenger Phusion (mod_rails) on a Mac OS X Leopard. The article assumes that both Rails and MySQL have already been installed.
Here are the 11 steps to get a Passenger Phusion based Rails app going:
System Preferences >> Sharing
Uncheck Web Sharing
$ gem install passenger
$ passenger-install-apache2-module
edit /etc/apache2/httpd-conf and add the following three lines:
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.0.6
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
This step allows us to access a local Wordpress blog from http://wp.local
Edit /etc/hosts and add the following line:
127.0.0.1 railstestapp.local
Edit /etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@railstestapp.local
DocumentRoot "/Users/user/Sites/railstestapp/public"
RailsEnv development
ServerName railstestapp.local
ServerAlias *.railstestapp.local
ErrorLog "/private/var/log/apache2/railstestapp.local-error_log"
CustomLog "/private/var/log/apache2/railstestapp.local-access_log" common
</VirtualHost>
The RailsEnv development line is required to run the Rails app in development mode. Also, note that the document root is the public directory.
System Preferences >> Sharing
Uncheck Web Sharing
$cd /Users/user/Sites
$rails railstestapp
Edit your database.yml file in your Rails app so it looks like this:
development:
adapter: mysql
database: railstestapp_development
username: root
password: password
socket: /tmp/mysql.sock
test:
adapter: mysql
database: railstestapp_test
username: root
password: password
socket: /tmp/mysql.sock
production:
adapter: mysql
encoding: utf8
database: railstestapp_production
username: root
password: password
socket: /var/run/mysqld/mysqld.sock
rake db:create
ruby script/generate scaffold Post title:string body:string
http://railstestapp.local/posts
The following article gave me the clue on how to set the Rails app in development mode:
http://benr75.com/2008/04/12/setup-mod_rails-phusion-mac-os-x-leopard
Installing Passenger Phusion instructions at: http://www.modrails.com/install.html
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!