Here's a 3 min screencast that covers an Ubuntu installing everything required via rvm, including ruby and bundler : http://www.youtube.com/watch?v=RDuSrP3w06Y
\curl -L https://get.rvm.io | bash -s stable --ruby
If you do not have all the required dependencies, you may be prompted for your sudo password. If you do not have sudo access, it would be advisable not to go this way [REFERENCE MISSING]
\curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=read-fail
RVM ensures that all aspects of Ruby run within your user space, so install a local rvm managed version.
rvm install 1.9.3
This should default to the latest patched version in 1.9.3 series.
Some Tips: You can list the other versions of ruby that you could optionally install and use and swap in and out. I've currently just got the one that corresponds to the one in the Ubuntu repository:
rvm list. List the bunch:
rvm list known. Reference: http://rvm.io/rubies/installing.
At this point you should be good to go with e.g.
rvm gemset list.
known Issue: However, for me,
rvm use led to errors:
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
Solution - Load rvm as a function:
Test it with :
type rvm | head -n 1
If this yields "rvm is a function", now you're good to go. Reference: https://rvm.io/rvm/install.
Add this to your ~/.bash_profile so you don't have to repeat it every time.
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Now that you can use the function, you can survey the landscape and take note of what has been handily set up for you via drush omega-wizard. Ahead of gems, there's the ruby version
rvm use, though note, this is to change between multiple installed versions of ruby i.e.
rvm list vs.
rvm list known
Instead, list and review your subtheme gemset:
rvm gemset list and if you wanted to change eg.
rvm gemset use omega.themename. Here's where you'll see subtheme gemset that was set up via
drush omega-wizard and you should not need to change it.
If, for some reason, you find that gemset for your subtheme was not automatically created, double check that you can run rvm as a function before proceeding. It's ready for use in .ruby-gemset and .ruby-version. If all else fails, you can manually create gemsets via
rvm --create firstname.lastname@example.org. Eg. for a subtheme named 'voltas'
rvm --create email@example.com
Double check the result with
rvm gemset list to see your newly created gemset. Make sure everything aligns with .ruby-gemset.
Good to go and set with the subtheme gemset, you can now run:
And with Bundler already installed, go ahead and bundle install the gems:
This will install project gems and their dependencies and create the file Gemfile.lock.
After this, you can check out all those gems installed with:
gem list and browse the path where all the RVM action takes place outside of the subtheme:
~/.rvm/gems. No redundancies, here - RVM uses a common cache directory so 1) you're not bloating your project repositories and 2) a common cache system is used so only a single copy of each downloaded version of each gem resides on disk, instead of multiple copies.
Git or svn version control? Add everything (Gemfile Gemfile.lock .ruby-gemset .ruby-version .rvmrc) and commit this initial gemset setup.
A bit tricky, maybe, but not really and RVM is worth the effort. Saves time and hassle and safeguards against future high-risk version conflicts. What's the point in exchanging a known layer of haphazard nonsense with CSS if there's an additional problematic unknown one related to the use of Gems and Sass?
Now you can add/edit to your theme and
compass compile or
compass watch with Omega 4.