Rails 3 migration stories?

15 views
Skip to first unread message

Greg Campbell

unread,
Feb 4, 2010, 11:29:56 PM2/4/10
to merb
Now that the Rails 3 beta is out, I'm curious to hear if people are
starting to test out migrating from Merb apps. Any strategies or
"gotchas" worth discussing?

Jacques Crocker

unread,
Feb 4, 2010, 11:34:15 PM2/4/10
to me...@googlegroups.com
Updating one of my apps at the moment.

I'm currently porting merb-helpers to run ontop of Rails3. I'll still have to update all my controllers and routes, but at least maybe I can reuse my views.

Will keep you posted.

> --
> You received this message because you are subscribed to the Google Groups "merb" group.
> To post to this group, send email to me...@googlegroups.com.
> To unsubscribe from this group, send email to merb+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/merb?hl=en.
>

Jacques Crocker

unread,
Feb 5, 2010, 5:45:26 AM2/5/10
to merb
Scratch that. merb-helpers probably isn't portable to Rails 3. Why? My
first big disappointment with Rails 3 is they kept the horrendously
bad view helper idiom of:

<% form do %>
...
<% end %>

My favorite feature of merb was that helpers just returned a string
(and not crazy hacks using concat and buffers). Similar to:


<%= form do %>
...
<% end =%>

Writing reusable view helpers with rails is a nightmare, and I don't
see that changing in Rails 3.

I could have sworn I saw Yehuda's blog post that he found a way to
make <%= some_helper do %> <% end %> work in Rails3. Not sure why it
got removed. Here's the post
http://yehudakatz.com/2009/08/31/simplifying-rails-block-helpers-with-a-side-of-rubinius/

I dunno, maybe its still possible and I'm just missing something. I'll
keep investigating.

Paul Dlug

unread,
Feb 5, 2010, 10:16:09 AM2/5/10
to me...@googlegroups.com

I haven't followed the Rails 3 development that closely, at this
point, are there any compelling reasons to motivate a migration from
Merb to Rails 3?


--Paul

MarkMT

unread,
Feb 5, 2010, 11:43:43 AM2/5/10
to merb
> are there any compelling reasons to motivate a migration from
> Merb to Rails 3?

Would be great if Yehuda were to drop in and comment.

Yehuda Katz

unread,
Feb 5, 2010, 2:03:09 PM2/5/10
to me...@googlegroups.com
Jacques,

Unfortunately, the built-in ERB engine didn't get updated for 3.0. It's close to the top of my list for 3.1. Thankfully, that needn't post any major problem for migration.

Specifically, you can make a :merb template engine with the BlockAwareEnhancer applied and then just make your merb helpers foo.html.merb.

Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325

Jacques Crocker

unread,
Feb 5, 2010, 4:04:15 PM2/5/10
to me...@googlegroups.com
Cool, I'll give that a try. Thanks for the tip.

Jeff Pollard

unread,
Feb 5, 2010, 7:15:34 PM2/5/10
to me...@googlegroups.com
Jacques,

When you do that, please post the instructions somewhere :)

Thanks,

-J
Reply all
Reply to author
Forward
0 new messages