I am reading the book Programming Ruby and am looking to upgrade the version of Ruby on my computer. I run Mac OS X Snow Leopard and doing ruby -v in the command line shows I am running Ruby 1.8.7. I installed MacPorts and ran the sudo port install ruby19 command but whenever I type ruby -v, it still shows Ruby 1.8.7. Could anyone help with this? And that would certainly be new enough to use with Ruby on Rails 6. This is also referred to as System Ruby, a version of Ruby that Apple provides with the operating system. It is notable that that in the macOS Catalina release notes, Apple warns that future versions of the operating system may not include Ruby.
Mac OS X Ruby on Rails
The Rails team never tries to disguise its enthusiasm for Mac OS X, but it has given short shrift to developers who prefer other platforms - so let's amplify the Rails Editors and IDEs story a bit. Once the installation has completed, we need to tell RVM which version of Ruby we currently want to use: rvm use 1.9.2. Next, test it by checking the version number: ruby -v. On my computer, this returns ruby 1.9.2p290 (2011-07-09 revision 32553) x8664-darwin11.1.0. Good job, you're now using Ruby 1.9.2. There's just one last thing to deal with.
© May 2019 Anthony Lawrence
I've been ignoring Ruby on Rails for a while now. Oh, I knew I'd have to look at it sooner or later, but you know the old saying about old dogs and new tricks. You may have also seen a dog or two being dragged across a floor when they didn't want to go somewhere; that's pretty much the image you should have of me and Ruby on Rails.
The July 2006 issue of Linux Journal has been kicking around the edges of my desk for a few days. Part of the reason I had been pushing it aside is that the cover theme is Ruby, Ruby, Ruby. 'Fahh, fahh, fahh', I grumbled to myself as I once again moved this issue somewhere where it couldn't stare at me with that accusatory 'you haven't even OPENED me' look.
Last night, sometime after we had eaten dinner and before settling on the porch with a Corona, I picked up the magazine and started thumbing through it. I read the letters, perused 'diff -u', skipped 'At the Forge' and 'Cooking with Linux', and then thumbed to Reuven Lerner's 'Introduction to Ruby'.I probably made a face as I started reading, but then..
Hey, this isn't so bad. Mac OS X 10.4 has ruby and irb (interactive ruby) installed by default, so I was able to just type 'irb' and follow along with the examples. Hmm.. I'm starting to like this 'ruby' thing. Suddenly I don't feel like I'm being dragged across the floor trying to dig my nails into linoleum. No, this dog likes Ruby! Give me more!
So what the heck: let's go for the Rails! I found hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger(link dead, sorry)Building Ruby, Rails, LightTPD, and MySQL on Tiger, which is an excellent guide to getting this all installed. One minor glitch: I had some trouble with Ruby Gems. Unfortunately,I'm not sure what finally got it working, but ultimately it started behaving. I tried installing it manually, but couldn't get by a 'No such file to load -- rubygems (LoadError)'.The Hivelogic docs mention that and say it's a PATH problem, but that wasn't the case for me. I did some web searching and found that Ruby can be quite confused as to what the real problem is when it gives this error, but I still couldn't nail it down. Because I was multitasking while investigating this, I had gone ahead and installed MySQL; strangely it seems that Gems started working after that.. I can't imagine why.
Anyway, the final step was to have Rails create a skeleton app. I did 'rails try_rails; cd try_rails; ruby script/server' and then pointed Firefox at https://localhost:3000 - and there it was, Ruby on Rails up and running and ready for me to use.
Well, it's ready. I'm not. I have quite a bit more reading and futzing about to do before I can do anything useful or fun.But at least it's all installed, and I have a reason to read more of this month's Linux Journal.
See Mac OS X Ruby on Rails II also.
Ruby On Rails Mac Os
Got something to add? Send me email.
Install Ruby Mac
(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version
-> -> Mac OS X Ruby on Rails
Inexpensive and informative Apple related e-books:
Take Control of OS X Server
Take Control of the Mac Command Line with Terminal, Second Edition
El Capitan: A Take Control Crash Course
Take Control of Pages
Take Control of IOS 11