Sgvizler has moved to github. This site and its repository will no longer be maintained.
wiki:Sgvizler/HowTo/Virtuoso+Rails3+Apache+SgvizlerOnMac

How to setup Virtuoso + Rails3 + Apache + Sgvizler on Mac OSX 10.8

Thanks to Raoul Jean Pierre Bonnal for writing up this how-to.

Setup done on/with:

  • OSX 10.8
  • XCode
  • Homebrew: ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
  • Ruby+RVM: \curl -L https://get.rvm.io | bash -s stable --ruby
  • Git: bew install git

This is a more challenging configuration, you can reuse it also with OWLIM-lite, at least Apache and Rails part.

Virtuoso: download the free/open source edition, I use the ones from github

git clone https://github.com/openlink/virtuoso-opensource.git
cd virtuoso-opensource
brew install libtool #this are required on my machine
brew install gawk
./autogen.sh
export CFLAGS="-O -m64 -mmacosx-version-min=10.8"
./configure
make
make install
echo “PATH=/usr/local/virtuoso-opensource/bin:$PATH #Add Virtuoso” >> ~/.bash_profile
cd /usr/local/virtuoso-opensource/var/lib/virtuoso/db
virtuoso-t +foreground

open  http://localhost:8890/ please read original documentation to discover default passwords: dba/dba for link above

Rails3.x:

gem install rails
gem install passenger

Note: please be careful to have configured correctly RVM.

passenger-install-apache2-module
cd /Users/yourusername/Site
mkdir rails
cd rails
rails new myproject
cd ..
ln -s rails/myproject myproject

ToBeContinue?.... ADDIING SPECS on how to import all javascript files and css

Apache2.2

Apache 2.2 is already installed in OSX 10.8, the only problem is that there is no more GUI for configuration. We’ll install a test web site under our home directory.

LoadModule passenger_module /Users/youusername/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRoot /Users/yourusername/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17
PassengerRuby /Users/yourusername/.rvm/wrappers/ruby-1.9.3-p194/ruby

<VirtualHost *:80>
  RailsEnv development
  RackEnv development
  ServerName area51.local
    DocumentRoot /Users/yourusername/Sites
    <Directory /Users/yourusername/Sites>
       Options Indexes MultiViews FollowSymLinks
       # This relaxes Apache security settings.
       AllowOverride all
       # MultiViews must be turned off.
       Options -MultiViews
       Order allow,deny
       Allow from all
    </Directory>
    RackBaseURI /myproject
    <Directory /Users/yourusername/Sites/myproject >
      Options -MultiViews
    </Directory>
<Location "/virtuoso">
ProxyPass http://localhost:8890/sparql
ProxyPassReverse http://localhost:8890/sparql
</Location>

</VirtualHost>

<Directory "/Users/yourusername/Sites/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

We must tell to our system how to resolve area51.local

sudo echo '127.0.0.1 area51.local' >> /etc/hosts

And that's it, open  http://area51.local/seadragon