how to set-up ruby and gems on bamboo ondemand ?

I somehow successfully installed ruby (using rvm) on a custom edited AMI but for some reasons the bamboo agent doesn't recognise the gems ( sass -v throws not found error, compass does the same).

Any help would be higly appreciated. I can't believe bamboo doesn't support ruby out of the box !

2 answers

I don't see how that would help .

@James: I assume by that you mean that Atlassian OnDemand does not support Ruby and should warn potential users that they should hence stay away from the product or opt to self-host?

If you are not too sold to Atlassian tools (as I am) try to stay away from Bamboo as much as possible! It seems designed only for java. Setting up ruby on bamboo is painful !

For a ruby, python, golang, node etc project I would recommend Travis-CI.

Anyway I finally got it working on bamboo as I had no choice and here is what worked and what didn't work

What did work :
install ruby through rvm. Make sure you install it as "bamboo" user otherwise it may not work.

provide the executable paths to Bamboo through the Image configuration. E.g.
/usr/local/bin/node
/usr/local/bin/grunt
/usr/local/rvm/gems/ruby-1.9.3-p448/bin/compass
/usr/local/rvm/gems/ruby-1.9.3-p448/bin/sass
/usr/local/rvm/gems/ruby-1.9.3-p448/bin/scss

sudo chown -R bamboo /usr/local
Look for the gems in /home/bamboo/.rvm/gems/ruby-1.9.3-p448@global/bin
get root access (sudo su) and then install the gems using the rvm path of the bamboo user :
/home/bamboo/.rvm/bin/gem install sass compass susy

What was supposed to work but didn't work:
rvm 1.9.3. @global do install compass susy sass etc
rvm 1.9.3. @global do gem uninstall rubygems-bundler
rvm use 1.9.3@global --default
Compile ruby 1.9 from source (no rvm)
and more...

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,906 views 12 18
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot