How to setup Omega4 on Fedora/CentOS running on Vagrant

Submitted by ravisagar on Tue, 10/07/2014 - 21:00

Omega 4 is a great theme for creating amazing responsive site in Drupal. There are lot of improvements in Omega 4 over Omega 3 but it is a bit difficult to work on Omega 4, which is actually for a good reason as it brings lot of flexibility. Omega 4 now supports SASS and the system need to be prepared first before you can start using SASS.

Today we are sharing instructions to setup Ruby, RVM, Gems and Bundle

Install RVM

su
\curl -sSL https://get.rvm.io | bash -s stable



usermod -G rvm vagrant

also do for root


usermod -G rvm root

Make rvm available to the user.

source /etc/profile.d/rvm.sh

Now logout and login again

Move inside omega4 subtheme folder
The moment you enter the sub theme directory, you will get a prompt to install ruby for a specific version. Just copy the command and install it.


rvm install ruby-1.9.3-p547

Install Gems and compiling SASS
Now if you run the following command you will get an error.


drush omega-guard
Install missing gems with `bundle install’.

Now run the following commands to download and install Gems as specified in your Gemfile in your theme folder.


bundle install

Now you are all set. Just run "drush omega-guard" or "bundle exec guard" to monitor your theme. Now whatever changes you do in the .scss files the guard will sense it and compiles it. If LiveReload is also enabled then it should also work.