You need to be Payday Loans UK Why would you

Installing Ruby on Rails on FreeBSD

I suppose apache, mysql-server alredy installed and working properly.

if ruby hasn’t installed yet:

# cd /usr/ports/lang/ruby18/
# make install clean

install rails x.x.x:
# cd /usr/ports/www/rubygem-rails
# make install clean

install mysql gem:
# /usr/local/bin/gem install mysql

install passenger:
# cd /usr/ports/www/rubygem-passenger
# make install clean

in apache config(httpd.conf):
# For ruby (passenger)
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9
PassengerRuby /usr/local/bin/ruby18

you should check version (bold in text) of passenger and change to yours. It could become obsolete at that point in time.

after that add Visrual host in apache with point “../public”  of your project, restart apache and going to be happy :)

6 Responses to “Installing Ruby on Rails on FreeBSD”

  1. And what about installing all these on nginx – not apache?
    Also passenger requires Apache 2.2…

  2. Hi slaFFik,
    Thanks for your comment!
    Nginx should be built with “PASSENGER_MODULE” and then you will need configure passenger in ngix’s configuration.
    This question a little out of this post.

  3. Here a PDF for FreeBSD + Rails 3.2 + RbEnv + Ruby 1.9.3 + MySQL :)
    http://www.rubybb.com/bsdonrails.pdf

  4. Is there a reason you have the commands commented out in your article?

  5. Hi Tass,

    Tanks for your question.

    Hash sign uses just to show that commands are running under root. This is a common in Unix documentation.

  6. Thanks!!!