You need to run rake in the context of jruby.

Try this:

C:\projects\shop>jruby -S rake db:migrate


-----Original Message-----
From: capi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 31, 2007 1:27 PM
To: [email protected]
Subject: Re: [jruby-dev] Error using JDBC connection adapter


Dont know if it might help, when i run rake db:migrate i have this output:

C:\projects\shop>%RUBY_HOME%/bin/rake db:migrate
(in C:/projects/shop)
rake aborted!
database configuration specifies nonexistent jdbc adapter



capi wrote:
> 
> since im trying to run my aplication on tomcat,
> i made some chages on the envionment.rb, i add 
> 
> if RUBY_PLATFORM =~ /java/
>   require 'rubygems'
>   RAILS_CONNECTION_ADAPTERS = %w(jdbc)
> end
> 
> before:
> Rails::Initializer.run do |config|
> 
> i also download the mysql-connector-java-5.0.7-bin.jar and i put it in my
> %JRUBY_HOME%lib directory.
> 
> in the database.yml file i changed the connection to:
> development:
>   adapter: jdbc
>   driver: com.mysql.jdbc.Driver
>   url: jdbc:mysql://localhost:3306/database_development
>   username: root
>   password: password
> 
> when i start my webbrick to make the connection using jdbc i have this
> error:
> 
> => Booting WEBrick...
>
C:/jruby-1.0/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/co
nnection_adapters/abstract/connection_specification.rb:204:in
> `establish_connection': development database is not configured
> (ActiveRecord::AdapterNotSpecified)        from
>
C:/jruby-1.0/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/co
nnection_adapters/abstract/connection_specification.rb:195:in
> `establish_connection'        
>         from
> C:/jruby-1.0/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:229:in
> `initialize_database'
>         from
> C:/jruby-1.0/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:88:in
> `process'
>         from
> C:/jruby-1.0/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:43:in
> `send'
>         from
> C:/jruby-1.0/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:43:in
> `run'
>         from ./script/../config/../config/environment.rb:51
>         from
> C:/jruby-1.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
>         from
> C:/jruby-1.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
>         from
>
C:/jruby-1.0/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/webrick
.rb:52
>         from
> C:/jruby-1.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
>         from
> C:/jruby-1.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
>         from
> C:/jruby-1.0/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39
>         from
> C:/jruby-1.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
>         from
> C:/jruby-1.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `require'
>         from :-1
> 
> 
> Any clue how to fix this?
> Thank yuo in advance
> 
> 

-- 
View this message in context:
http://www.nabble.com/Error-using-JDBC-connection-adapter-tf4194053.html#a11
929903
Sent from the JRuby - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to