# Problem creating war file with warbler

**URL:** <https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891>\
**Category:** Ruby\
**Created:** [March 25, 2008, 5:05pm UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891 "2008-03-25T17:05:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomask](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@thomask](https://www.ruby-forum.com/u/thomask)\
**Post date:** [March 25, 2008, 5:05pm UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891/1 "2008-03-25T17:05:58Z")

</div>

Hi,

we are trying to move from the (deprecated) goldspike rails plugin to  
the new warbler gem to create a war file from our RoR application, but I  
cannot get the war file to run.

Everything seems to be OK, all needed gems (especially ruby-net-ldap)  
are packaged in the right places.

Tomcat and the application startup fine, I can access my login screen.  
Authentication is done agains a LDAP server but when my app tries to  
contact the LDAP server, it throws an error:

“no such file to load – net/ldap”

but the gem is part of the war file and is located in the same place as  
all the other gems (rails, jdbc-adapter etc)

I’m using JRuby 1.1RC2 and warbler 0.9.4

I wouldn’t be that confused if it failed to load /any/ gem, but it seems  
to be limited to the ldap gem as the rails gems and the  
activerecord-jdbc-adapter are loaded fine (and are working)

Any ideas? What am I missing here?

Any help is greatly appreciated

Thanks in advance  
Thomas

---

<div class="post-metadata">

**Author:** ![thomask](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@thomask](https://www.ruby-forum.com/u/thomask)\
**Post date:** [March 25, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891/2 "2008-03-25T17:12:30Z")

</div>

net/ldap is native code, so you can’t run that on jruby yet.  
My guess is you’d need to call out to JNDI if you wanted to talk to  
LDAP on JRuby.

On Tue, Mar 25, 2008 at 4:04 PM, Thomas K.

---

<div class="post-metadata">

**Author:** ![thomask](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@thomask](https://www.ruby-forum.com/u/thomask)\
**Post date:** [March 25, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891/3 "2008-03-25T17:30:56Z")

</div>

Dick D., 25.03.2008 17:11:

> net/ldap is native code, so you can’t run that on jruby yet.  
> My guess is you’d need to call out to JNDI if you wanted to talk to  
> LDAP on JRuby.
> 
> On Tue, Mar 25, 2008 at 4:04 PM, Thomas K.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > “no such file to load – net/ldap”

jruby-ldap-net is running fine from within NetBeans with JRuby 1.1 and  
it’s running fine when beeing packed with the old goldspike plugin…

Thomas

---

<div class="post-metadata">

**Author:** ![thomask](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@thomask](https://www.ruby-forum.com/u/thomask)\
**Post date:** [March 26, 2008, 8:32am UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891/4 "2008-03-26T08:32:42Z")

</div>

Nick S., 25.03.2008 18:33:

> > >
> 
> /Nick

Hi Nick, thanks for your answer.

Sorry for the confusion, I’m using ruby-net-ldap (no J involved here)

I tried Warbler 0.9.4 and Warbler 0.9.5 none of them worked.

Thomas

---

<div class="post-metadata">

**Author:** ![thomask](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@thomask](https://www.ruby-forum.com/u/thomask)\
**Post date:** [March 26, 2008, 10:31am UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891/5 "2008-03-26T10:31:01Z")

</div>

Thomas K., 25.03.2008 17:02:

> Authentication is done agains a LDAP server but when my app tries to  
> contact the LDAP server, it throws an error:
> 
> “no such file to load – net/ldap”
> 
> but the gem is part of the war file and is located in the same place as  
> all the other gems (rails, jdbc-adapter etc)

Follow-up:

I found this piece of code on the JRuby Wiki pages to detect all needed  
gems:

BUILD\_GEMS = %w(warbler rake rcov)  
for gem in Gem.loaded\_specs.values  
next if BUILD\_GEMS.include?(gem.name)  
config.gems[gem.name] = gem.version.version  
end

interesting enough this does not include ruby-net-ldap as well.

So what’s so special about this gem?

(Btw: I have tried using jruby-ldap as well, but that broke our code)

Thomas

---

<div class="post-metadata">

**Author:** ![thomask](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@thomask](https://www.ruby-forum.com/u/thomask)\
**Post date:** [March 25, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891/6 "2008-03-25T18:35:11Z")

</div>

On Tue, Mar 25, 2008 at 11:30 AM, Thomas K.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > 
> 
> jruby-ldap-net is running fine from within NetBeans with JRuby 1.1 and it’s running fine when beeing packed with the old goldspike plugin…

Are you using jruby-ldap or ruby-net-ldap?  
([Ola Bini: Programming Language Synchronicity: Announcing JRuby/LDAP](http://ola-bini.blogspot.com/2007/10/announcing-jrubyldap.html))

There was a bug w/ gems that had native components that was fixed in  
Warbler 0.9.4. Maybe you could try that.

/Nick

---

<div class="post-metadata">

**Author:** ![thomask](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@thomask](https://www.ruby-forum.com/u/thomask)\
**Post date:** [March 26, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891/7 "2008-03-26T16:10:57Z")

</div>

Thomas K., 25.03.2008 17:02:

> “no such file to load – net/ldap”
> 
> I’m using JRuby 1.1RC2 and warbler 0.9.4

I was finally able to get this to run:

I upgraded to JRuby 1.1RC3 (for running “warble”) and replaced the  
jruby-complete-1.1RC2.jar and goldspike-1.5.jar in the Warbler’s lib  
directory with jruby-complete-1.1RC3.jar and goldspike-1.6.jar.

Now everythings seems to be working fine.

Thomas

---

<div class="post-metadata">

**Author:** ![thomask](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@thomask](https://www.ruby-forum.com/u/thomask)\
**Post date:** [April 3, 2008, 12:51pm UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891/8 "2008-04-03T12:51:51Z")

</div>

Thomas K. wrote:

> Hi Nick, thanks for your answer.
> 
> Sorry for the confusion, I’m using ruby-net-ldap (no J involved here)
> 
> I tried Warbler 0.9.4 and Warbler 0.9.5 none of them worked.

Could you file a bug about this, ideally with a reproducible test case  
or app?

[http://jira.codehaus.org/browse/JRUBY](http://jira.codehaus.org/browse/JRUBY)

It would also help if you could hunt us down on the mailing list or on  
FreeNode IRC in #jruby…we’re standing by to help with this sort of  
thing.

- Charlie

---

<div class="post-metadata">

**Author:** ![thomask](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@thomask](https://www.ruby-forum.com/u/thomask)\
**Post date:** [April 3, 2008, 12:53pm UTC](https://www.ruby-forum.com/t/problem-creating-war-file-with-warbler/132891/9 "2008-04-03T12:53:01Z")

</div>

Thomas K. wrote:

> I was finally able to get this to run:
> 
> I upgraded to JRuby 1.1RC3 (for running “warble”) and replaced the  
> jruby-complete-1.1RC2.jar and goldspike-1.5.jar in the Warbler’s lib  
> directory with jruby-complete-1.1RC3.jar and goldspike-1.6.jar.

Oops, I saw this too late…glad to hear you got it working 🙂

- Charlie
