I got a White Macbook and I have to go to a conference in 10 hours but I'm having a lot of problems.
First, I wanted to have Rails 3, so I used MacPorts to install Ruby 1.8.7. It worked well ;) Then I was thinking I should install Rails 3, but no, no! It says:
$ sudo gem install rails --pre ERROR: Error installing rails: activesupport requires Ruby version >= 1.8.7.
What should I do? I already have 1.8.7!
Another reason the Mac has continued to be so popular is that has included Ruby, Rails & SQLite out of the box for the past few years. This means you can have a working Rails environment on every new machine. You can even do native development (full GUI desktop applications) on the Mac in Ruby.
ruby-build is a plugin for rbenv that allows you to compile and install different versions of Ruby. ruby-build can also be used as a standalone program without rbenv. It is available for macOS, Linux, and other UNIX-like operating systems.
First you need to install RVM, then the latest version of Ruby. Next you'll set that version of Ruby as the default. Finally, you'll install Rails b3.
Install RVM (http://rvm.beginrescueend.com/rvm/install/):
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Install the latest Ruby (http://rvm.beginrescueend.com/rubies/installing/):
rvm install ruby-head
You can check which versions you now have installed with:
rvm list
Set the latest version of Ruby as default (replace 'ruby-1.9.2-head' with desired version):
rvm ruby-1.9.2-head --default
Make sure things are up to day, then install the Rails beta:
gem update --system
gem install rails --pre
You may have to install some gem dependencies before Rails will install.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With