# Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1

**URL:** <https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361>\
**Category:** Rails\
**Created:** [February 15, 2009, 12:32pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361 "2009-02-15T12:32:42Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [February 15, 2009, 12:32pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/1 "2009-02-15T12:32:42Z")

</div>

Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1

WARNING: If you want to live on the edge, please continue with the  
steps  
below. Also, please be aware that all gems are not fully compatible  
with  
Ruby 1.9.1 stable release (i.e. 1.9.1p0). Furthermore, this  
installation requires you to remove ALL Ruby related gems and ports  
because  
we are performing a clean install. Lastly, I am using an  
experimental machine (i.e. Apple PowerMac G5) to complete this task and  
I  
would  
NOT advise the below actions within a production environment.

1. Remove Previous Ruby Ports (i.e. ruby, ruby19, rb-\*, and so on) and  
Gems

2. Remove Rake ( Optional If It Does Not Exist )

3. Install Ruby 1.9.1, SQLite3, and Mysql 5 Ports

4. Install Rack, Rake, and Rails 2.3.0 Ruby Gems

5. Install SQLite 3 Ruby Gem

6. Install MySQL 2.8.1 Ruby Gem

7. Install Thin

8. Generate Rails Test Application

9. Change To The Root Of Rails Application

10. Start Thin

11. Navigate To The Site Using Your Browser:

12. Now, Let Us Generate A Simple Blog

13. Migrate The Database

14. Navigate To The Site Using Your Browser:

15. If you made it this far,

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [February 16, 2009, 3:14am UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/2 "2009-02-16T03:14:09Z")

</div>

On Sun, Feb 15, 2009 at 3:32 AM, Conrad T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ```
> b) Gems
> 
> ```
> 
> 1. Install Ruby 1.9.1, SQLite3, and Mysql 5 Ports

```
 sudo port mysql5 +server

```

> 

sudo port install mysql5 +server

> ```
> sudo port sqlite3
> 
> ```

sudo port install sqlite3

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [March 3, 2009, 12:34pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/3 "2009-03-03T12:34:23Z")

</div>

On Feb 15, 9:13 pm, Conrad T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Sun, Feb 15, 2009 at 3:32 AM, Conrad T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Using MacPorts To Install Ruby 1.9.1 and Rails 2.3.0 RC1

Thank you. This was extremely helpful.

> > ```
> > sudo gem install kwatch-mysql-ruby --
> > 
> > ```
> > 
> > –with-mysql-config=/opt/local/lib/mysql5/bin/mysql\_config

$ sudo gem install kwatch-mysql-ruby – --with-mysql-config=/opt/local/  
lib/mysql  
5/bin/mysql\_config  
Password:  
ERROR: could not find gem kwatch-mysql-ruby locally or in a  
repository  
Updating class cache with 2296 classes…

$ sudo gem install kwatch-mysql-ruby --source=[http://gems.github.com](http://gems.github.com)  
– --with-mysql-config=/opt/local/lib/mysql5/bin/mysql\_config  
Building native extensions. This could take a while…  
Successfully installed kwatch-mysql-ruby-2.8.1  
1 gem installed

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [March 3, 2009, 2:02pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/4 "2009-03-03T14:02:44Z")

</div>

On Feb 15, 9:13 pm, Conrad T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Sun, Feb 15, 2009 at 3:32 AM, Conrad T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

For the archives:

> > 1. Start Thin
> 
> > ```
> > script/server thin
> > 
> > ```

Thin works, but WEBrick encounters an error:

```
Internal Server Error
undefined method `each'

```

See also:

> **[Ruby 1.9.0 compability](https://groups.google.com/g/rack-devel/c/Pp0bsW-Xe9Q)**

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [March 3, 2009, 3:46pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/5 "2009-03-03T15:46:32Z")

</div>

On Tue, Mar 3, 2009 at 5:01 AM, Jeff S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Thin works, but WEBrick encounters an error:
> 
> Internal Server Error  
> undefined method `each’

Yes, this is the expected behavior when trying to use WEBrick instead of  
Thin.

-Conrad

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [March 3, 2009, 3:48pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/6 "2009-03-03T15:48:53Z")

</div>

Conrad T. wrote:

> Yes, this is the expected behavior when trying to use WEBrick instead of  
> Thin.

Expected by whom? It certainly wasn’t expected by me, and I suspect it  
won’t be expected by other newbies. Anyway, thanks again for the  
step-by-step instruction.

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [March 3, 2009, 4:13pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/7 "2009-03-03T16:13:03Z")

</div>

On Tue, Mar 3, 2009 at 6:47 AM, Jeff S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > Yes, this is the expected behavior when trying to use WEBrick instead of  
> > Thin.
> 
> Expected by whom? It certainly wasn’t expected by me, and I suspect it  
> won’t be expected by other newbies. Anyway, thanks again for the  
> step-by-step instruction.

It was expected by me. If WEBrick was working, I would had added the  
following  
use case for step (9):

script/server

instead of

script/server thin

Furthermore, WEBrick and Mongrel wasn’t updated to support ruby 1.9.1 at  
the  
time I was  
putting this tutorial together. Lastly, I plan to turn these  
instructions  
into a blog post so that  
I can easily update it.

-Conrad

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [June 19, 2010, 11:17pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/8 "2010-06-19T23:17:54Z")

</div>

Google brought me here.

> 1. Install Ruby 1.9.1, SQLite3, and Mysql 5 Ports

I installed ruby 1.9.1 with the 1.9 suffix, and I think ./script/server  
is confused and is trying to run the old ruby stuff that ships with OSX.  
Does it mean I have to reinstall everything from scratch with the  
+nosuffix flag?

Thanks

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [June 20, 2010, 1:50pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/9 "2010-06-20T13:50:51Z")

</div>

> I installed ruby 1.9.1 with the 1.9 suffix, and I think ./script/server  
> is confused and is trying to run the old ruby stuff that ships with OSX.  
> Does it mean I have to reinstall everything from scratch with the  
> +nosuffix flag?
> 
> Thanks

I confirm I needed to reinstall ruby with +nosuffix. Now it all works,  
well except ruby-debug which won’t compile ☹

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [June 20, 2010, 7:17pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/10 "2010-06-20T19:17:59Z")

</div>

Sent from my iPhone

On Jun 20, 2010, at 4:50 AM, Fernando P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I confirm I needed to reinstall ruby with +nosuffix. Now it all works,  
> well except ruby-debug which won’t compile ☹

If you’re using Rails 3, it is recommended that you use Ruby 1.9.2.  
If this is the case, then you might want to use RVM for installing  
Ruby by doing the following:

rvm install 1.9.2- head

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [March 3, 2009, 4:25pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/11 "2009-03-03T16:25:29Z")

</div>

Conrad T. wrote:

> If WEBrick was working, I would had added the  
> following use case for step (9):
> 
> script/server
> 
> instead of
> 
> script/server thin

Fair enough.

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [June 20, 2010, 8:54pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/12 "2010-06-20T20:54:19Z")

</div>

> If you’re using Rails 3, it is recommended that you use Ruby 1.9.2.  
> If this is the case, then you might want to use RVM for installing  
> Ruby by doing the following:
> 
> rvm install 1.9.2- head
> 
> Good luck,
> 
> -Conrad

I’m still running 2.3.8 until 3 goes official. I’ll give a try at RVM.

By the way my machine runs Tiger on a PowerPC, is there any issue I  
might run into?

---

<div class="post-metadata">

**Author:** ![conz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/a5b964/32.png) [@conz](https://www.ruby-forum.com/u/conz)\
**Post date:** [June 20, 2010, 9:12pm UTC](https://www.ruby-forum.com/t/using-macports-to-install-ruby-1-9-1-and-rails-2-3-0-rc1/160361/13 "2010-06-20T21:12:45Z")

</div>

On Sun, Jun 20, 2010 at 11:54 AM, Fernando P.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> I’m still running 2.3.8 until 3 goes official. I’ll give a try at RVM.
> 
> By the way my machine runs Tiger on a PowerPC, is there any issue I  
> might run into?

If you’re using Rail 2.3.8, I would still recommend using Ruby 1.9.2  
instead  
of Ruby 1.9.1. Why?

> **[Ruby 1.9.2 Release Schedule Aims at August for Final Release](https://www.infoq.com/news/2010/03/ruby-192-schedule/)**
>
> Now that Ruby 1.9.2 passes all RubySpec tests, a revised release schedule for Ruby 1.9.2 has been announced. It aims at mid-August for the final release.

Next, I would recommend upgrading to Leopard but you should be good  
with Tiger.

Good luck,

-Conrad

–
