If this blog helped you in any way, please donate a dollar here

Showing posts with label Ruby. Show all posts
Showing posts with label Ruby. Show all posts

Friday, April 28, 2017

RVM Ruby Execution with launchctl on osx

This addresses a problem that goes like this:

You want to create a launch file for launchd (launchctl) to run a ruby file periodically or as a daemon.

Various solutions to this problem include creating an RVM alias for the particular ruby version you want to use. Here I present a working version without aliases, just uses the default RVM Ruby. Please not that, for me, the default rvm ruby is 2.2.5.

When you create a sample plist file like this:



The rvm environment does get initialized. You get lots of gem issues.

The trick here lies in not running ruby but:

rvm-shebang-ruby

Simply use:

Ruby and RVM environments are now correctly updated.

Yeah and you don't need to create any aliases. It will work perfectly fine.


Thursday, June 5, 2014

Omniauth OpenAM Gem

Hello people, here's presenting a brand new gem!

For folks, who think they hit a jackpot, think ruby. Yeah, well, this is an omniauth gem for Ruby on Rails people for openam. There has been an outstanding request for this gem on the requests page and here it is:

https://github.com/rghose/omniauth-openam

You can get the full list of omniauth gems here:

https://github.com/intridea/omniauth/wiki/List-of-Strategies

For those who are still confused, omniauth is one of the marvels of ruby which provides options for authentication options to devise based on external providers. I am still a newbie here, so pardon me please.