Every repository with this icon (
Every repository with this icon (
Installing on Mac OS
10.5: Leopard
Update RubyGems
Mac OS X 10.5 comes with a full Rails development environment installed, so getting Radiant running takes very little effort. First open the Terminal application from Applications / Utilities. Depending on your version of OS X your RubyGems installation may be out of date. Update it by running:
sudo gem update --system
sudo will cause the command to run with administrator privileges and may require you to enter your password; if you’re unfamiliar with the Terminal remember that as you type your password you won’t receive any visual feedback. The RubyGems update may take a few minutes or more to complete.
Install an Application Server
You have a choice a several server applications for Rails applications such as Radiant instances.
Mongrel or Webrick
Leopard comes with the Mongrel Gem and of course Ruby comes with the Webrick server, either of which work fine with Radiant, if you’re going to use Mongrel make sure you have the latest version:
sudo gem update mongrel
Thin
Some people prefer the Thin server which is lighter and faster than both Mongrel and Webrick, to install it run:
sudo gem install thin
Apache with Passenger
If you develop on more than one Radiant site at a time you should consider using Passenger in conjunction with the Passenger preference pane, you may also want to consider this route if you simply prefer a GUI tool to the command line. To do this, first install the Passenger Gem by running:
sudo gem install passenger
Next install the Passenger Apache module:
sudo passenger-install-apache2-module
As you can see at the end of the output you need to edit your Apache configuration (you can ignore the part about virtual hosts, the preference pane takes care of this automatically).
open /etc/apache2/other/passenger.conf
To this new file add the following (your passenger version number might be different so be sure to use the proper one):
LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.1.3/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.1.3
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
When you save the file you may be prompted to enter an administrator password. If your text editor fails to save the file you might try creating the file with the command line application nano by running:
sudo nano /etc/apache2/other/passenger.conf
Use command+v (as in other applications) to paste in the configuration lines, then press control+o to save the file and control+x to exit.
Now you need to install the Passenger preference pane. Download the latest version from the developers site and install it as you would any preference pane; namely by double clicking the downloaded file and double clicking the preference pane icon.
Your Preferences window should open up if installation was successful. You can leave this window open for now, we’ll need it again when we try to start Radiant.
Install Radiant
Installing Radiant is simple, just run:
sudo gem install radiant
Setup a new site
Now you can use the radiant command to generate a new site by running:
radiant --database sqlite3 ~/Sites/example
cd ~/Sites/example
rake db:bootstrap
When asked if you want to destroy any data in the database enter y and press return, you don’t even have a database yet so there is nothing to worry about being destroyed. Enter your name (i.e. Joe Smith), username (i.e. joe) and password when prompted. If you intend to follow along with the Getting Started article you should choose the “Empty” template by entering 1 and pressing return, otherwise enter the number corresponding to the template you’d like to use.
Start Radiant
If you’re using Mongrel or Webrick run:
./script/server
If you’re using Thin run:
thin start
If you’re using Passenger use the Finder to navigate to the Sites directory in your Home folder. Return to the Passenger preference pane and ensure the lock icon in the lower left corner is unlocked, drag the directory for your Radiant site from Finder into the empty left pane of the Passenger preference pane, then click Apply. Click the Show All button at the top of the preference window and click the Sharing button, if the Web Sharing checkbox is checked, uncheck it and then recheck it; if it’s already unchecked just check it.
If you used Mongrel, Thin or Webrick visit http://localhost:3000/ if you used Passenger visit http://example.local/






