Why does Warbler requires a db to build?

I’m running into an issue running warble on our build box. When I run
warble without mysql running, I get:

$ warble
rake aborted!
The driver encountered an error: com.mysql.jdbc.CommunicationsException:
Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused

I thought this might be for running tests, but when I tail the mysql
logs, it’s being accessed with the dev info. Why does Warbler require
anything be up, especially the dev environment?

Thanks,
Chris

On Mon, Sep 15, 2008 at 6:45 PM, Chris W. [email protected]
wrote:

java.net.SocketException
MESSAGE: java.net.ConnectException: Connection refused

STACKTRACE:

java.net.SocketException: java.net.ConnectException: Connection refused

I thought this might be for running tests, but when I tail the mysql logs,
it’s being accessed with the dev info. Why does Warbler require anything be
up, especially the dev environment?

The most recent warbler invokes the Rails environment task before
building the war file as part of a scheme to auto-detect some Rails
settings. I hadn’t anticipated this situation; looks like I should add
a way to disable that feature. Until I do, you can monkey patch
Warbler to disable it. If you don’t already have a config/warble.rb,
generate one, and then add this code at the top of the file (above the
line with Warbler::Config.new):


Turn off Rails auto-detection which invokes the environment task and

requires a DB connection
class Warbler::Config; def auto_detect_rails; true; end; end

Warbler web application assembly configuration file

Warbler::Config.new do |config|

end

Sorry for the trouble!

Cheers,
/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

+1
I’m unable to use Warbler with MRI, because I’m using jdbcmysql adapter.

On Mon, Sep 15, 2008 at 11:04 PM, Nick S. [email protected]
wrote:

I thought this might be for running tests, but when I tail the mysql
generate one, and then add this code at the top of the file (above the
end
http://xircles.codehaus.org/manage_email


Fabio K.

Caelum - Ensino e Inovação
http://www.caelum.com.br

On Tue, Sep 16, 2008 at 1:39 PM, Chris K. [email protected]
wrote:

Question: Do you know the time frame of fixing this? I am wondering if I
should make a note of this in the warbler chapter in our book. I will come
out around October.

I’d expect to have it fixed by the next release, I wouldn’t take the
trouble to mention the workarounds.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Question: Do you know the time frame of fixing this? I am wondering if I
should make a note of this in the warbler chapter in our book. I will
come out around October.

My issue with using postgresql is that I got this error even though I
have the activerecord-postgres-adapter gem installed.

C:\NetBeansProjects\testpostgreswarbler>C:\jruby\jruby-1.1.4\bin\jruby
-S warble
config
C:/jruby/jruby-1.1.4/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_suppo
rt/dependencies.rb:505:in load': Please install the postgres adapter:gem inst
all activerecord-postgres-adapter` (no such file to load –
active_record/connec
tion_adapters/postgres_adapter) (RuntimeError)

I get this error with both of the following settings

development:
adapter: postgres

development:
adapter: jdbcpostgres

scroll for more …
Nick S. wrote:

The most recent warbler invokes the Rails environment task before
building the war file as part of a scheme to auto-detect some Rails
settings. I hadn’t anticipated this situation; looks like I should add
a way to disable that feature. Until I do, you can monkey patch
Warbler to disable it. If you don’t already have a config/warble.rb,
generate one,
In order to run warble config, I had to edit the database.yml file to
set the adapter to mysql so I didn’t get the above problem. After I got
the config file and added this code, and the warble command worked. Now
to test with the deploy…

P.S. That’s cute about another bird sitting on my branch :^)

http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email