Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9296681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T21:53:09+00:00 2026-06-18T21:53:09+00:00

Backgound A little background to this question first: Ruby on Rails has some security

  • 0

Backgound

A little background to this question first: Ruby on Rails has some security issues as of late. So we need to update the Rails version on our projects. If you have a few, that gets old fast if you do it by hand… So I figured I can create a Thor task for this.

Question

This now works great! BUT! I need to respect the .rvmrc file for each project while installing the new versions of rails. I want this script to be OpenSourced soon, but I want to tacle the problem of not respecting the .rvmrc file first.

So what I need is a way of using the right RVM ruby version/gemset when I change to a directory to update the Rails version.

How is the way for this to be done? Can it be done from the Ruby script in a way so that it works on Mac and Linux, regardless of Shell (found a answer with zsh support, but what about all the other shells out there?)

Quick Example code:

#Scan the base directory down for Gemfiles
gem_files = File.join("**", "Gemfile")
Dir.glob(gem_files){|gemfile|
  project_folder = File.dirname(gemfile)
  puts "Found Gemfile in #{project_folder}"
  Dir.chdir(project_folder) do
    #TODO: Respect/load the rvmrc file in this directory
    update_gem_file(project_folder) #example
    run 'bundle update rails' #<--- needs to be done in the RVM gemset
  end
}

Just to give you an idea of what I’m trying to do.

Link to the script on the githubs

The github repo for my script — Work in Progress!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T21:53:10+00:00Added an answer on June 18, 2026 at 9:53 pm

    Check out this project https://github.com/versapay/bundler-auto-update it basically:

    Attempt to update every single gem of your Gemfile to its latest patch, minor then major release. Runs a test command to ensure the update succeeded

    As for RVM use this simple code:

    #Scan the base directory down for Gemfiles
    gem_files = File.join("**", "Gemfile")
    Dir.glob(gem_files){|gemfile|
      project_folder = File.dirname(gemfile)
      puts "Found Gemfile in #{project_folder}"
      run "rvm in #{project_folder} do bundle-auto-update -c rake spec"
    }
    

    You can find more details on scripting with RVM on https://rvm.io

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First I will give a little background info so this question isn't completely without
First a little background about why I'm asking this question... I'm working on a
First a little background. I am building a mobile app for a client, this
Before getting to the question let me provide a little background. First MyMainForm starts
First - a little bit about my background: I have been programming for some
I'm doing a little experiment, trying to alternate background colours for nested divs. This
A little background first. I've been tasked with encrypting files with a Powershell script
A little background first: I'm a designer/developer and decided to use subversion for a
Little Background: I have csv file which has lots of rows and each row
First a little background: I have already managed to connect to a Microsoft SOAP

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.