Forum: JRuby db: migrate error

Posted by Veerendra P. (veerendra_p)
on 2013-02-06 14:30
when run rake db:migrate error raising below error
Please help me resolving error.
D:\pmsdev>rake db:migrate --trace
WARNING: 'require 'rake/rdoctask'' is deprecated.  Please use 'require
'rdoc/tas
k' (in RDoc 2.4.2+)' instead.
    at
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/rdoctas
k.rb
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
==  Setup: migrating
==========================================================
-- create_table(:improvement_votes)
   -> 0.0150s
   -> 0 rows
-- create_table(:reviews)
rake aborted!
An error has occurred, this and all later migrations canceled:

ActiveRecord::ActiveRecordError: Column, parameter, or variable #2:
Cannot find
data type date.: CREATE TABLE reviews ([id] int NOT NULL IDENTITY(1, 1)
PRIMARY
KEY, [date] date, [freezed] bit DEFAULT 0, [project_id] int,
[created_at] dateti
me, [updated_at] datetime)
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/connection_adapters/abstract_adapter.rb:221:in `log'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.7-java
/lib/active_record/connection_adapters/jdbc_adapter.rb:582:in `execute'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/connection_adapters/abstract/schema_statements.rb:109:in `create_table'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:352:in `method_missing'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:328:in `say_with_time'
D:/jruby/jruby-1.5.0/lib/ruby/1.8/benchmark.rb:293:in `measure'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:328:in `say_with_time'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:348:in `method_missing'
./db/migrate//20101002044907_setup.rb:87:in `up'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:282:in `migrate'
D:/jruby/jruby-1.5.0/lib/ruby/1.8/benchmark.rb:293:in `measure'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:282:in `migrate'
D:1:in `migrate'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:491:in `migrate'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:565:in `call'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:565:in `ddl_transaction'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/connection_adapters/abstract/database_statements.rb:136:in
`transaction'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/transactions.rb:182:in `transaction'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:565:in `ddl_transaction'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:490:in `migrate'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:477:in `each'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:477:in `migrate'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:401:in `up'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record
/migration.rb:383:in `migrate'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/tasks/databases.rake
:112
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in
 `call'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in
 `execute'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in
 `each'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in
 `execute'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in
 `invoke_with_call_chain'
D:/jruby/jruby-1.5.0/lib/ruby/1.8/monitor.rb:191:in `mon_synchronize'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in
 `invoke_with_call_chain'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in
 `invoke'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb
:116:in `invoke_task'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb
:94:in `top_level'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb
:94:in `each'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb
:94:in `top_level'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb
:133:in `standard_exception_handling'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb
:88:in `top_level'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb
:66:in `run'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb
:133:in `standard_exception_handling'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb
:63:in `run'
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/bin/rake:33
D:/jruby/jruby-1.5.0/lib/ruby/gems/1.8/gems/rake-0.9.2.2/bin/rake:19:in
`load'
D:\jruby\jruby-1.5.0\bin\rake:19
Tasks: TOP => db:migrate
Posted by Keith B. (keith_b)
on 2013-02-06 16:21
(Received via mailing list)
Veerendra -

Is it necessary for you to run such an ancient version of JRuby (and 
Rails, if I remember correctly)?

It looks like you're on Windows.  How do you use rake instead of jruby 
-S rake?  Is it picking up rake from your MRI Ruby environment? If not, 
I'd recommend trying jruby -S rake.

- Keith

---
Keith R. Bennett
http://about.me/keithrbennett
Posted by Veerendra P. (veerendra_p)
on 2013-02-07 12:40
Keith B. wrote in post #1095543:
> Veerendra -
>
> Is it necessary for you to run such an ancient version of JRuby (and
> Rails, if I remember correctly)?
>
> It looks like you're on Windows.  How do you use rake instead of jruby
> -S rake?  Is it picking up rake from your MRI Ruby environment? If not,
> I'd recommend trying jruby -S rake.
>
> - Keith
>
> ---
> Keith R. Bennett
> http://about.me/keithrbennett

Hi Keith,

Thanks for reply,

I have jruby application runnning on production environment with the
above mentioned versions,so i am using same versions ruby and source
code for setting up development environment.

so could you please advice me how i can setup the application with the
source code for newer version of Jruby.

Many Thanks
Veerendra
Posted by Keith B. (keith_b)
on 2013-02-07 16:04
(Received via mailing list)
Veerendra -

That's hard to say without knowing your server setup.

At its simplest, jruby is just a jar file.  If you're not familiar with 
how it's installed and used on your server, I'd suggest learning more 
about it as a very high priority, or interacting with someone else in 
your organization who knows about it.

- Keith


---
Keith R. Bennett
http://about.me/keithrbennett
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.