Create the war file

Hi everybody,
I am trying to build a new Jruby application thanks to an old ruby
application
So I modified files environment.rb and database.yml
I installed warble but I am not able to create the war file.
I obtain an error :
rake aborted!
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split
C:/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/
repaired_system.rb:109
:in `find_runnable’
(See full trace by running task with --trace)

I don’t know what to do ?

I also try to create war file thanks to Goldspike but I can’t install it
:
C:\jrails_apps\EPFWiki>jruby script/plugin install
http://jruby-extras.rubyforge.org/sv...gins/goldspike
Plugin not found:
[“http://jruby-extras.rubyforge.org/svn/trunk/rails-integration/plugins/goldspike”]

And if I retry this command :
C:\jrails_apps\EPFWiki>jruby script/plugin install
http://jruby-extras.rubyforge.org/sv...gins/goldspike
already installed: goldspike
(http://jruby-extras.rubyforge.org/sv...gins/goldspike). pass --force to
reinstall

Naturly I can’t create war file :
C:\jrails_apps\EPFWiki>jruby -S rake create_war
(in C:/jrails_apps/EPFWiki)
rake aborted!
Don’t know how to build task ‘create_war’

(See full trace by running task with --trace)

Thanks for you help

Ze lo wrote:

Hi everybody,
I am trying to build a new Jruby application thanks to an old ruby
application
So I modified files environment.rb and database.yml
I installed warble but I am not able to create the war file.
I obtain an error :
rake aborted!
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split
C:/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/
repaired_system.rb:109
:in `find_runnable’
(See full trace by running task with --trace)

I don’t know what to do ?

Ok I found the problem:
JRuby wasn’t able to evaluate my “PATH”
So I update the method find_runnable in file repaired_system.rb:

def find_runnable(file)
  if file =~ RUNNABLE_PATTERN
    file
  else
    ENV["PATH"]="C:\jruby-1.2.0\bin;"
[nil, ".", *ENV["PATH"].split(";")].each { |path|
      RUNNABLE_EXTS.each { |ext|
        test = (path ? "#{path}/" : "") + "#{file}.#{ext}"
        if File.exist?(test)
          return test
        end
      }
    }
    nil
  end
end

Then I xopy the war file in tomcat webapps folder, and it almost work
I have a problem wy all link (css, javascript and hyperlink dosn’t work)

I hope you will be able to me

Ze lo wrote:

Hi everybody,
I am trying to build a new Jruby application thanks to an old ruby
application
So I modified files environment.rb and database.yml
I installed warble but I am not able to create the war file.
I obtain an error :
rake aborted!
You have a nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split
C:/jruby-1.2.0/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/
repaired_system.rb:109
:in `find_runnable’
(See full trace by running task with --trace)

I basically have the same problem. The suggested patch seems to work. At
least the WAR file is created. Haven’t gotten it to run in JBoss yet.

Anybody know if a Warbler update is in the plans?

I had the same problem until upgrading Rake to recent (0.8.6) version.

HTH

-A-

Norman Smith wrote:

Anybody know if a Warbler update is in the plans?

I ment Rake update?