Koozali.org: home of the SME Server

Obsolete Releases => SME 9.x Contribs => Topic started by: pcdoc on May 29, 2017, 10:18:42 AM

Title: Ruby on Rails on SME9.2
Post by: pcdoc on May 29, 2017, 10:18:42 AM
I want to install ruby on rails on a 9.2 VM and am having some issues. It works well on a centos 6.7 VM, but is installing rub 1.8.7 and I need >1.9.7

The only info on this site is for sme7 and says to setup the centos-testing repo... not much use on 9.2 though.

I have the latest version of gems on the VM, but need to install a later version of ruby to get rails running. I would rather not compile ruby as this could get messy down the track if it needs updating.

Any thoughts on what repo I could use? or another way around it?

Thanks all.

Matt Holmes
Title: Re: Ruby on Rails on SME9.2
Post by: Stefano on May 29, 2017, 10:24:26 AM
hi..

you'd start from here:
https://wiki.contribs.org/Software_collections

HTH
Title: Re: Ruby on Rails on SME9.2
Post by: pcdoc on May 29, 2017, 12:47:54 PM
Thanks Stefano. Its strange, I did a search for ruby on rails in wiki, forums, howto etc, but the software collections item did not show.

So I already had software collections installed (for nextcloud), when I went to install ruby with enablerepo=centos-sclo-rh and all others disabled, it could not find ruby. I tried without disablerepo and the only ruby shown was 1.8.7.

I ran yum list available --disablerepo=* --enablerepo=centos-sclo-rh | grep ruby and it showed ruby193 and ruby200 available. I installed ruby200 with its dependencies but when running ruby -v or ruby200 -v the VM put its hands in the air and went silent.

So, I tried installing ruby193 with the same result. I also went into /opt/rh/ruby193 and ran >sh ./enable as well as the v8314 folder.

Same result.

edit - OK, sort of have it running. Have tried with both ruby193 and ruby200, I can get the version up with >scl enable ruby200 'ruby -v' but when I go to install rails using gem it complains I don't have ruby-2.2.2 now.

Last error message is 'activsupport requires Ruby version >= 2.2.2.

Thoughts?
Is there some documentation I have been unable to find on the site that I am missing?
Title: Re: Ruby on Rails on SME9.2
Post by: guest22 on May 29, 2017, 01:02:42 PM
but when running ruby -v or ruby200 -v the VM put its hands in the air and went silent.


You need to enable ROR Software Collections specifically for the task. Please see https://wiki.contribs.org/Software_Collections:Nodejs#Enable_the_Node.js_environment_at_boot_time as an example


HTH
Title: Re: Ruby on Rails on SME9.2
Post by: guest22 on May 29, 2017, 01:04:55 PM
edit - OK, sort of have it running. Have tried with both ruby193 and ruby200, I can get the version up with >scl enable ruby200 'ruby -v' but when I go to install rails using gem it complains I don't have ruby-2.2.2 now.

Last error message is 'activsupport requires Ruby version >= 2.2.2.

Thoughts?
Is there some documentation I have been unable to find on the site that I am missing?


Yeah, if there is a dependency for a higher version of ROR other then available via SCL, then you are out of luck for now...
Title: Re: Ruby on Rails on SME9.2
Post by: Stefano on May 29, 2017, 01:21:07 PM
Its strange, I did a search for ruby on rails in wiki, forums, howto etc, but the software collections item did not show.

I know.. the internal search engine in the wiki is not the best..
Title: Re: Ruby on Rails on SME9.2
Post by: pcdoc on May 29, 2017, 01:46:37 PM
also tried installing rh-ruby22 from scl and tried to install rails on it. I can do it for an older version of rails, but that will just give me more headaches down the road.

I might try with the latest Koozali 10 iteration and see how that goes.

I will let you know how I go
Title: Re: Ruby on Rails on SME9.2
Post by: guest22 on May 29, 2017, 01:47:35 PM
I'll spin up a VM and see how I go. Will let you know.