hi,
i’m a jruby newcomer and i’m following a tutorial in some practical
jruby on rials book the following exception pops up when i try to
migrate the database and i dont know how to handle it please help me.
Thank you in advance.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
The driver encountered an error: can’t convert nil into String
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.5/lib/active_record/co
nnection_adapters/jdbc_adapter.rb:265:in initialize' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.5/lib/active_record/co nnection_adapters/jdbc_adapter.rb:41:in
new’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/ActiveRecord-JDBC-0.5/lib/active_record/co
nnection_adapters/jdbc_adapter.rb:41:in jdbc_connection' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne ction_adapters/abstract/connection_pool.rb:223:in
new_connection’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne
ction_adapters/abstract/connection_pool.rb:245:in
checkout_new_connection' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne ction_adapters/abstract/connection_pool.rb:188:in
checkout’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne
ction_adapters/abstract/connection_pool.rb:184:in loop' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne ction_adapters/abstract/connection_pool.rb:184:in
checkout’
c:/jruby-1.5.1/lib/ruby/1.8/monitor.rb:191:in mon_synchronize' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne ction_adapters/abstract/connection_pool.rb:183:in
checkout’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne
ction_adapters/abstract/connection_pool.rb:98:in connection' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne ction_adapters/abstract/connection_pool.rb:326:in
retrieve_connection’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne
ction_adapters/abstract/connection_specification.rb:123:in
`retrieve_connection’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/conne
ction_adapters/abstract/connection_specification.rb:115:in connection' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/migra tion.rb:440:in
initialize’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/migra
tion.rb:401:in new' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/migra tion.rb:401:in
up’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/migra
tion.rb:383:in migrate' C:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/tasks/databases.rake:112 c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
call’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
each’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with
_call_chain’
c:/jruby-1.5.1/lib/ruby/1.8/monitor.rb:191:in mon_synchronize' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with
_call_chain’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_tas
k’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
`top_level’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
each' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_e xception_handling' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in
run' c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_e
xception_handling’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in
run' C:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/jruby-1.5.1/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:19:in
load’
c:/jruby-1.5.1/bin/rake:19
On Tue, Aug 10, 2010 at 3:35 PM, Ahmed Mr [email protected] wrote:
ActiveRecord-JDBC-0.5
this one looks unfamiliar to me. my gem list of working rails-2.3.8
application with jruby-1.5.1 is (I guess the rack-1.1.0 can be omitted
and
jruby-openssl is optional)
$ gem list
*** LOCAL GEMS ***
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activerecord-jdbc-adapter (0.9.4)
activeresource (2.3.8)
activesupport (2.3.8)
jdbc-mysql (5.0.4)
jruby-openssl (0.7)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)
maybe that helps.
regards Kristian
kristian wrote:
On Tue, Aug 10, 2010 at 3:35 PM, Ahmed Mr [email protected] wrote:
ActiveRecord-JDBC-0.5
$ gem list
*** LOCAL GEMS ***
actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activerecord-jdbc-adapter (0.9.4)
activeresource (2.3.8)
activesupport (2.3.8)
jdbc-mysql (5.0.4)
jruby-openssl (0.7)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)
i’v used the most recent found gems (jruby 1.5.1 and rails 2.3.8) and i
dont know what should i do should i use older version or what ?
Than you.
On Tue, Aug 10, 2010 at 4:28 AM, Ahmed Mr [email protected] wrote:
i’v used the most recent found gems (jruby 1.5.1 and rails 2.3.8) and i
dont know what should i do should i use older version or what ?
gem update activerecord-jdbc-adapter
for starters.
What DB are you using?
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Tue, Aug 10, 2010 at 4:36 AM, Ahmed Mr [email protected] wrote:
gem update activerecord-jdbc-adapter
for starters.
What happens after you update?
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
Hassan S. wrote:
On Tue, Aug 10, 2010 at 4:36 AM, Ahmed Mr [email protected] wrote:
gem update activerecord-jdbc-adapter
for starters.
What happens after you update?
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
i didnt update i used it from the begining but i think there is some
thing missing i dont know. maybe the configuration file of the database.
my database.yml looks like this:
development:
adapter: jdbc
database: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost/shoplet_dev
username: shoplet_dev
password: XXXXXXXXXXXXX
pool:
timeout: 5000
i’v tryed to change the adapter from jdbc to mysql but it says it cant
find the file to load
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please
install
the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load – mysql
c:/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require’
c:/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require’
c:/jruby-1.5.1/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dep
endencies.rb:156:in `require’
so again me:
development:
adapter: mysql
encoding: utf8
reconnect: false
database: test_development
pool: 5
username: root
password:
socket: /var/run/mysqld/mysqld.sock
and again may be it helps. Kristian
On Tue, Aug 10, 2010 at 5:16 PM, Ahmed Mr [email protected] wrote:
twitter: @hassan
development:
find the file to load
c:/jruby-1.5.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
To unsubscribe from this list, please visit:
  http://xircles.codehaus.org/manage_email
–
Kristian Meier + Saumya Sharma + Sanuka Meier
Vadakkethu House,
Edayanmula West PO - 689532,
Pathanamthitta District, Kerala, INDIA
tel: +91 468 2319577
protect your privacy while searching the net: www.ixquick.com
       =
      q(--)p
      ') (`
      //Â
     _(<  / )
   (__|/__)
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
On Tue, Aug 10, 2010 at 4:46 AM, Ahmed Mr [email protected] wrote:
i didnt update i used it from the begining but i think there is some
thing missing i dont know.
And I’m telling you that you should update your adapter.
maybe the configuration file of the database.
my database.yml looks like this:
development:
adapter: jdbc
database: com.mysql.jdbc.Driver
“database” is the DB/schema name, so change it to (presumably, based
on the URL you show)
database: shoplet_dev
and add this:
driver: com.mysql.jdbc.Driver
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
kristian wrote:
so again me:
development:
adapter: mysql
encoding: utf8
reconnect: false
database: test_development
pool: 5
username: root
password:
socket: /var/run/mysqld/mysqld.sock
and again may be it helps. Kristian
changing the adapter to mysql results this error
D:\Jets Jobs\2010-2011\courses\JRuby\rials projects\shoplet>gem install
mysql
Successfully installed mysql-2.8.1-x86-mingw32
1 gem installed
Installing ri documentation for mysql-2.8.1-x86-mingw32…
Updating class cache with 0 classes…
Installing RDoc documentation for mysql-2.8.1-x86-mingw32…
D:\Jets Jobs\2010-2011\courses\JRuby\rials projects\shoplet>jruby -S
rake db:mig
rate
(in D:/Jets Jobs/2010-2011/courses/JRuby/rials projects/shoplet)
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please
install
the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load – mysql
(See full trace by running task with --trace)
first it asks me to install the mysql gem. as you can see i did but it
still gives me the same error. should i restart some thing ?
thank you
On Tue, Aug 10, 2010 at 5:18 AM, Hassan S.
[email protected] wrote:
and add this:
driver: com.mysql.jdbc.Driver
And presumably you do have the Connector/J jar file somewhere
in your classpath?
–
Hassan S. ------------------------ [email protected]
twitter: @hassan
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email