# Routes difference with Ruby 1.8.6 and 1.8.7

**URL:** <https://www.ruby-forum.com/t/routes-difference-with-ruby-1-8-6-and-1-8-7/166813>\
**Category:** Rails\
**Created:** [April 29, 2009, 8:47pm UTC](https://www.ruby-forum.com/t/routes-difference-with-ruby-1-8-6-and-1-8-7/166813 "2009-04-29T20:47:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bosko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b77776/32.png) [@bosko](https://www.ruby-forum.com/u/bosko)\
**Post date:** [April 29, 2009, 8:47pm UTC](https://www.ruby-forum.com/t/routes-difference-with-ruby-1-8-6-and-1-8-7/166813/1 "2009-04-29T20:47:44Z")

</div>

Recently I’ve found Enki, blog engine written in Rails. It is very  
simple and I though I could use it, but I’ve faced one problem that  
prevented it. Namely:

rake spec

ran from Ruby 1.8.6 and 1.8.7 gives different results. On 1.8.6 all  
tests pass but on 1.8.7 four (similar) errors occur. In routes.rb file  
Enki has:

admin.resources :undo\_items, :member =\> {:undo =\> :post}

which gives (both in 1.8.6 and 1.8.7) following (rake routes):

new\_admin\_undo\_item GET /admin/undo\_items/new(.:format)  
{:action=\>“new”, :controller=\>“admin/undo\_items”}  
edit\_admin\_undo\_item GET /admin/undo\_items/:id/edit  
(.:format) {:action=\>“edit”, :controller=\>“admin/undo\_items”}  
undo\_admin\_undo\_item POST /admin/undo\_items/:id/undo  
(.:format) {:action=\>“undo”, :controller=\>“admin/undo\_items”}  
admin\_undo\_item GET /admin/undo\_items/:id(.:format)  
{:action=\>“show”, :controller=\>“admin/undo\_items”}

Comments controller in destroy method has part:

```
  format.json {
    render :json => {
      :undo_path => undo_admin_undo_item_path(undo_item),
      :undo_message => undo_item.description,
      :comment => @comment
    }.to_json

```

And above path is something that makes problems. Namely result of the  
test it:

ActionController::RoutingError in ‘Admin::CommentsController handling  
DELETE to destroy, JSON request deletes comment’  
undo\_admin\_undo\_item\_url failed to generate from  
{:action=\>“undo”, :controller=\>“admin/  
undo\_items”, :id=\>#\<Spec::Mocks::Mock:0x…fdafca166  
@name=“undo\_item”\>}, expected: {:controller=\>“admin/  
undo\_items”, :action=\>“undo”}, diff: {:id=\>#\<Spec::Mocks::Mock:  
0x…fdafca166 @name=“undo\_item”\>}

on Ubuntu (both 8.10 and 9.04) with ruby 1.8.7 while, on the other  
hand, on Windows (Ruby 1.8.6) this test pass.

Has anyone found similar problem with routes handling in 1.8.6 and  
1.8.7 (Rails 2.3.2) or can give any hint why test fails?

Regards,  
Bosko
