The Ruby RailsInstaller is an excellent way to get Ruby on Rails installed on your computer. But if you’re on Mac OS X, you’ve probably run into this problem with the Ruby RailsInstaller:
There has been an error.
Error changing group of /opt to rvm
The application will exit now.
In most cases, there’s an easy solution. Read on to find out how we got here and how to recover.
Getting the RailsInstaller
The RailsInstaller is a package of tools you’ll need to create your Ruby on Rails app. The Mac bundle includes:
- Ruby 1.9.3-p392
- Rails 3.2
- Bundler
- Git
- Sqlite
- osx-gcc-installer
- JewelryBox
- RVM
- SM Framework
You can get it at railsinstaller.org.
Scroll down the page for the download link.
If you’re working on Mac OS X 10.7 (Lion) or 10.8 (Mountain Lion) like I am, click the big green button for Mac OS X 10.7 & 10.8. Instead of downloading a .dmg file, the RailsInstaller file name is “RailsInstaller-1.0.4-osx-10.7.app.tgz”. The file is 336.1 MB, so allow yourself enough time to download it.
When the file is finished downloading, open it and Mac will unzip it for you.
Installing Ruby on Rails with the RailsInstaller
Open the file to start the installation.
Depending on your security settings in Mac OS X System Preferences, you might get this warning about installing apps that aren’t from the Mac App Store or identified developers.
Some might complain about this being a play by Apple to get more revenue through their App Store, but it is a legitimate security issue to allow installation of 3rd party apps. It’s up to you whether you want to take the risk, but I have enough faith in the RailsInstaller that I’m going to go ahead and open it.
If you don’t want to bother changing your security settings, there’s another way to get around the restriction. Instead of double-clicking on the installer, do a two-finger click or control+click. A menu pops up. Click “Open” from this menu. This time you’ll get a different warning:
By opening the file this way, your computer still warns you that the app is from an unidentified developer, but if you are sure you want to open it click the “Open” button.
One more security check before you can start installing: you have to enter an administrators name and password to give consent for the application to be installed.
Finally Installing
After going through the security hoops, the RailsInstaller finally gets to work.
First of all, you need to choose your language. You have plenty of options, so very few should feel left out.
With your preferred language selected, the RailsInstaller setup window opens. Do you really want to install Ruby on Rails? If yes, click “Next.”
Next you must setup your Git configuration. Just enter your name and email address so collaborators can identify your work.
At this point, the RailsInstaller finally thinks that it’s ready to start installing.
You’d think that after all these windows that clicking “Next” might actually accomplish something.
RailsInstaller: Error Changing Group
Unfortunately, instead of installing Rails, the installer just gives you this error.
This error changing group doesn’t give you much to work with. Your only option is to click “OK.” True to the warning, the Rails Installer then immediately exits.
Looking around online you might come across various suggestions for how to fix this — everything from reinstalling Apple Xcode to reinstalling your entire operating system. Hopefully you’ve found this post before you did any of those things, though.
The IT Crowd has popularized the running gag that you can fix any IT problem by “turning it off and on again.”
In this case, this is absolutely the right solution. Don’t reinstall anything. Just restart your computer and open the installer again.
Since you’ve already gone through Apple’s security protocol, you won’t have to see those screens again, but you will have to — once again — choose your language, configure Git, and tell the installer that you do actually want it to install.
If all goes well, the RailsInstaller will finally install. However, it does take quite a while to setup all the packages in the bundle. (In my case it took about half an hour.)
With this little hiccup out of the way, it’s time to get started with Rails!
What app will you build?
Let us know in the comments below.
SLee says
I just started this course on Treehouse.com: “Build a Simple Ruby on Rails Application.” It’s supposed to teach me how to create a very simple social networking site where people can leave status updates.
You can get access to hundreds of hours of quality programming, design, and business training on Treehouse.com through this AppSumo deal.
Michael Martin says
Even after an install on 10.8.5, i found that I had to quit the terminal session that I may or may not have opened, and then restart it. Once the terminal session restarted, all is well.
BTW — is there any known conflicts between RailsInstaller and BREW installation?
Tony says
Thanks. glad I read your entry before the others. Being an old Windows developer and support person I know the phrase well, “Have you rebooted lately?” 😀