# Web framework for Ruby 1.9

**URL:** <https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333>\
**Category:** Ruby\
**Created:** [November 15, 2008, 12:46am UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333 "2008-11-15T00:46:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 15, 2008, 12:46am UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/1 "2008-11-15T00:46:22Z")

</div>

I’m looking for a web framework that:

1. really works with Ruby 1.9

2. pure Ruby code (i.e. doesn’t depend on C-extensions, Java  
libraries…)

3. has an active community

bonus points:

1. doesn’t follow the “let’s extend core classes whenever possible”  
craze

2. good postgres support

Does such a framework exist or am I asking for too much?

Actually I would use Rails, the latest RC is advertised as Ruby 1.9  
compatible but I’ve immediately hit a couple of errors and I  
don’t have the time ATM to fix compatibility errors in such a big  
codebase and push the changes upstream. What’s more, the pure  
Ruby postgres driver doesn’t work anymore.

Merb fails with syntax errors with Ruby 1.9.

Thanks,  
Stefan

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 15, 2008, 3:43am UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/2 "2008-11-15T03:43:31Z")

</div>

On Nov 14, 2008, at 4:42 PM, Stefan L. wrote:

> codebase and push the changes upstream. What’s more, the pure  
> Ruby postgres driver doesn’t work anymore.
> 
> Merb fails with syntax errors with Ruby 1.9.
> 
> Thanks,  
> Stefan

it’s called ramaze.

a @ [http://codeforpeople.com/](http://codeforpeople.com/)

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 15, 2008, 11:56am UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/3 "2008-11-15T11:56:29Z")

</div>

2008/11/15 ara.t.howard [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > don’t have the time ATM to fix compatibility errors in such a big  
> > codebase and push the changes upstream. What’s more, the pure  
> > Ruby postgres driver doesn’t work anymore.
> > 
> > Merb fails with syntax errors with Ruby 1.9.
> > 
> > Thanks,  
> > Stefan
> 
> it’s called ramaze.

Thanks. At least a basic app works fine in Ruby 1.9,  
installation is simple, only dependency rack and  
colored console output. Neat.

But what the hell is with all these extensions to core classes.

```
acquire __DIR__ /"*.rb"

```

Thats Kernel#acquire, Kernel# **DIR** , Symbol#/  
and String#/. What’s wrong with a simple:

```
Ramaze::Utils.acquire_relative "*.rb"

```

There is nothing modular about putting arbitrary  
utility methods into core classes!

Stefan

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 15, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/4 "2008-11-15T21:40:50Z")

</div>

On Fri, Nov 14, 2008 at 3:42 PM, Stefan L.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. doesn’t follow the “let’s extend core classes whenever possible” craze
> 
> 2. good postgres support
> 
> Does such a framework exist or am I asking for too much?

Rails satisfies all 5 for me, but you may find Active Support adds too  
much for your taste.

> Actually I would use Rails, the latest RC is advertised as Ruby 1.9  
> compatible but I’ve immediately hit a couple of errors and I  
> don’t have the time ATM to fix compatibility errors in such a big  
> codebase and push the changes upstream. What’s more, the pure  
> Ruby postgres driver doesn’t work anymore.

What’d you run into? The only outstanding compatibility issue I have  
is with the test/unit → minitest change.

Rails has been chasing 1.9 compatibility like a drowning man gulps for  
air. Luckily the recent feature freeze means we’re close to having dry  
land underfoot.

The latest postgres-pr works, btw. The earlier driver was missing the  
#transaction\_status method.

> Merb fails with syntax errors with Ruby 1.9.
> 
> Thanks,  
> Stefan

Best,  
jeremy

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 15, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/5 "2008-11-15T17:36:27Z")

</div>

On Nov 15, 2008, at 3:52 AM, Stefan L. wrote:

> Thats Kernel#acquire, Kernel# **DIR** , Symbol#/  
> and String#/. What’s wrong with a simple:
> 
> Ramaze::Utils.acquire\_relative “\*.rb”
> 
> There is nothing modular about putting arbitrary  
> utility methods into core classes!
> 
> Stefan

perhaps - but there are far less than in any other ruby framework.  
also **DIR** and the ‘/’ string join i think are planned for a future  
ruby release…

a @ [http://codeforpeople.com/](http://codeforpeople.com/)

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 16, 2008, 1:43pm UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/6 "2008-11-16T13:43:35Z")

</div>

2008/11/15 Jeremy K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> > bonus points:  
> > Actually I would use Rails, the latest RC is advertised as Ruby 1.9  
> > compatible but I’ve immediately hit a couple of errors and I  
> > don’t have the time ATM to fix compatibility errors in such a big  
> > codebase and push the changes upstream. What’s more, the pure  
> > Ruby postgres driver doesn’t work anymore.
> 
> What’d you run into? The only outstanding compatibility issue I have  
> is with the test/unit → minitest change.

- Creating an app failed with an exception. Installing the test-unit  
gem fixed that.

- Booting the application failed because config/boot.rb depends  
on a Gem::RubyGemsVersion that is not defined in the RubyGems 1.3.1  
that comes with Ruby 1.9.1 (I’ve got a fairly recent build from the  
1\_9\_1  
branch). I fixed that by constantly returning “1.3.1” from  
rubygems\_version.

- Freezing rails failed with missing method in RubyGems. Didn’t find  
a fix for that.

- Rails didn’t use the postgres-pr driver I installed with “gem  
install”.  
(And that wasn’t a RubyGems issue, it didn’t work with postgres-pr  
in vendor either). Neither ruby-postgres nor pg built with Ruby 1.9.

> Rails has been chasing 1.9 compatibility like a drowning man gulps for  
> air. Luckily the recent feature freeze means we’re close to having dry  
> land underfoot.
> 
> The latest postgres-pr works, btw. The earlier driver was missing the  
> #transaction\_status method.

Great, where can I get that version?

Stefan

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 16, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/7 "2008-11-16T21:05:14Z")

</div>

I’m just curious, why would you use 1.9 if JRuby has rails support?  
The support tools, native threads and performance would seem  
compelling (I’m still on 1.8.6).

Sent from my iPhone

On Nov 15, 2008, at 3:36 PM, “Jeremy K.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 16, 2008, 11:07pm UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/8 "2008-11-16T23:07:49Z")

</div>

Stefan L. wrote:

> There’s Ruby 1.9, the language and then there are  
> implementations. JRuby lags behind in 1.9 compatibility  
> (understandably, because 1.9 has been in flux until very  
> recently).
> 
> Ruby 1.9 has some nice features like the encoding support  
> and the earlier the Ruby community migrates, the better.

We’ve already started adding 1.9 support and the plan is to have it done  
around the time of the 1.9.1 final release at Christmas. The  
parser+interpreter are almost done, compiler will follow that. Some core  
library changes have been migrated already, and M17N (new String) is  
under way.

I agree there are some compelling features in 1.9, and 1.9.1 being the  
first real feature-frozen release makes it a good time for us to get  
JRuby to support it. You can test out what works in 1.1.5 by passing  
–1.9 flag…but a lot more will be in 1.1.6.

> Regarding performance, I have a rails app running on  
> JRuby and it’s actually slightly slower than MRI 1.8.

You may want to try 1.1.5…we’ve gotten reports that it’s quite a bit  
faster than 1.1.4. At any rate, we’re making a big performance push  
specifically targeted at Rails, which seems to do something we’re a bit  
slower at. We’ll find it. Any information you can feed us (like specific  
parts of the app that are slower, etc) would be of great help 🙂

- Charlie

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 17, 2008, 12:44am UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/9 "2008-11-17T00:44:23Z")

</div>

On Sat, Nov 15, 2008 at 7:52 PM, Stefan L.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > 1. has an active community  
> > > compatible but I’ve immediately hit a couple of errors and I  
> > > it’s called ramaze.
> 
> Thats Kernel#acquire, Kernel# **DIR** , Symbol#/  
> and String#/. What’s wrong with a simple:
> 
> Ramaze::Utils.acquire\_relative “\*.rb”
> 
> There is nothing modular about putting arbitrary  
> utility methods into core classes!

Thanks for your feedback, I’ll address these things.  
At least acquire will become Ramaze::acquire, I think the String#/ and  
Symbol#/ are quite useless as well, given that File.join never changes  
the separator no matter which platform, so we can deprecate them as  
well.  
But **DIR** , I will keep that one around, it’s a proposed feature  
since quite some time and chances are high that it will be added to  
ruby sometime in the future.

Please note that all methods added to core classes are kept in their  
own modules and will never cause any overwrites of existing methods.  
See [http://github.com/manveru/ramaze/tree/master/lib/ramaze/snippets.rb](http://github.com/manveru/ramaze/tree/master/lib/ramaze/snippets.rb)

^ manveru

---

<div class="post-metadata">

**Author:** ![stefanl38](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a698b9/32.png) [@stefanl38](https://www.ruby-forum.com/u/stefanl38)\
**Post date:** [November 16, 2008, 9:47pm UTC](https://www.ruby-forum.com/t/web-framework-for-ruby-1-9/153333/10 "2008-11-16T21:47:30Z")

</div>

2008/11/16 Peter B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I’m just curious, why would you use 1.9 if JRuby has rails support? The  
> support tools, native threads and performance would seem compelling (I’m  
> still on 1.8.6).

There’s Ruby 1.9, the language and then there are  
implementations. JRuby lags behind in 1.9 compatibility  
(understandably, because 1.9 has been in flux until very  
recently).

Ruby 1.9 has some nice features like the encoding support  
and the earlier the Ruby community migrates, the better.

Regarding performance, I have a rails app running on  
JRuby and it’s actually slightly slower than MRI 1.8.

Stefan
