using a different version of ruby #27166
-
I’m working on an action to run CI for our rails app. I was using actions/setup-ruby@v1 successfully, however our app won’t run using a ruby higher than 2.3.4. I’m trying to install ruby 2.3.x and running into various issues. Anyone have a recommendation on how to install ruby 2.3.4? I’m running my job on ubuntu-latest. |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments
-
I know this is probably not what you want to hear, but perhaps it is time to deal with the real issue at hand? 2.3 is EOL and things are only going to get harder for you the longer you wait. Perhaps updating the app is a better way to invest your time, and eliminate technical debt rather than adding to it? That said, it this is not an option, then perhaps you can simply follow the usual Ruby installation steps - maybe with RVM? |
Beta Was this translation helpful? Give feedback.
-
Indeed, upgrading ruby is important but not happening at the moment. |
Beta Was this translation helpful? Give feedback.
-
btw I’m using rbenv to install ruby. The Gemfile is bundled fine, but when I try to run a rake task, gems aren’t found. I’ve tried various things, like setting GEM_PATH, setting BUNDLE_PATH, etc. Haven’t found the solution yet. This is more of a ruby question at this point, but I was hoping somebody has run into this. |
Beta Was this translation helpful? Give feedback.
-
I tried installing ruby 2.3 inside the Actions runner, using snap, just to see if I can provide you with a solution. The installation succeeded, but running ruby --version still shows newer version. Perhaps you can play with it further.
|
Beta Was this translation helpful? Give feedback.
-
Hi @tswetonic , For actions/setup-ruby, the required minimum version is 2.4. You can find it mentioned in action.yaml here. You can use another action ‘ruby/setup-ruby@v1’ instead. Code as below, hope it helps.
|
Beta Was this translation helpful? Give feedback.
-
I tried that and it didn’t work. Will try again, thanks! I did have success with rvm too. |
Beta Was this translation helpful? Give feedback.
-
@weide-zhou did you use ubuntu-latest as your runner? |
Beta Was this translation helpful? Give feedback.
-
Thanks @weide-zhou this now works. Last time I tried it, it failed! |
Beta Was this translation helpful? Give feedback.
-
Not sure what changed. Maybe this was a one-off failure when I tried it. |
Beta Was this translation helpful? Give feedback.
-
نظر شما رو برسی میکنم با تشکر |
Beta Was this translation helpful? Give feedback.
Hi @tswetonic ,
For actions/setup-ruby, the required minimum version is 2.4. You can find it mentioned in action.yaml here.
You can use another action ‘ruby/setup-ruby@v1’ instead. Code as below, hope it helps.