# Named routes not working with jruby-rack?

**URL:** <https://www.ruby-forum.com/t/named-routes-not-working-with-jruby-rack/138819>\
**Category:** JRuby\
**Created:** [May 28, 2008, 2:33am UTC](https://www.ruby-forum.com/t/named-routes-not-working-with-jruby-rack/138819 "2008-05-28T02:33:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rib\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/977dab/32.png) [@Rib\_R](https://www.ruby-forum.com/u/Rib_R)\
**Post date:** [May 28, 2008, 2:33am UTC](https://www.ruby-forum.com/t/named-routes-not-working-with-jruby-rack/138819/1 "2008-05-28T02:33:41Z")

</div>

I’m trying to go through this tutorial using jruby:

> **[Rolling with Rails 2.0 - The First Full Tutorial - Part 1 | AkitaOnRails.com](https://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial)**
>
> for brazilians: click here.
> I am very happy to see that my Rails 2.0 Screencast was very well received. More than 1,500 unique visitors watched it...

Things seem to be working fine using script/server, but building a  
.war using warbler doesn’t seem to work:  
ActionView::TemplateError (undefined local variable or method  
`new\_post\_path’ for #ActionView::Base:0x121671e) in  
posts/index.html.erb:

```
app/views/posts/index.html.erb:26:in

```

`_run_erb_47app47views47posts47index46html46erb' gems/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `compile\_and\_render\_template’  
gems/gems/actionpack-2.0.2/lib/action\_view/base.rb:365:in  
`render_template' gems/gems/actionpack-2.0.2/lib/action_view/base.rb:316:in `render\_file’  
gems/gems/actionpack-2.0.2/lib/action\_controller/base.rb:1100:in  
`render_for_file' gems/gems/actionpack-2.0.2/lib/action_controller/base.rb:858:in `render’  
…

I tried building a war with goldspike instead, and the named routes  
worked, but then I get session errors because the servlet session  
store doesn’t support generate\_digest, and I couldn’t get it to just  
use cookie\_store. Any ideas how I can get this to work?

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```

---

<div class="post-metadata">

**Author:** ![Rib\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/977dab/32.png) [@Rib\_R](https://www.ruby-forum.com/u/Rib_R)\
**Post date:** [May 28, 2008, 2:43pm UTC](https://www.ruby-forum.com/t/named-routes-not-working-with-jruby-rack/138819/2 "2008-05-28T14:43:44Z")

</div>

On Tue, May 27, 2008 at 7:32 PM, Rib R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> `\_run\_erb\_47app47views47posts47index46html46erb’  
> worked, but then I get session errors because the servlet session  
> store doesn’t support generate\_digest, and I couldn’t get it to just  
> use cookie\_store. Any ideas how I can get this to work?

It seems to be a bug. Would you mind submitting the .war file you  
created to an issue in JRuby’s JIRA for further inspection?  
[http://jira.codehaus.org/browse/JRUBY](http://jira.codehaus.org/browse/JRUBY)

I don’t have any ideas at the moment. The application I’m working on  
definitely uses named routes and we package it with Warbler and  
JRuby-Rack, and we haven’t seen this problem.

Thanks,  
/Nick

* * *

To unsubscribe from this list, please visit:

```
http://xircles.codehaus.org/manage_email

```
