BitNami の Jruby をダウンロードしました。すべて問題ありませんが、SQL Server 2008 に接続しようとすると、何か問題が発生します。
database.yml は次のとおりです。
development:
adapter: sqlserver
host: 127.0.0.1
instanceName: SQLServer2008
database: truetemp
username: sa
password: 7354500
コマンド「Jruby -S rails generate scaffold Product title:string ....」を使用すると、ROR がうまく機能します。しかし、コマンド「rake db:migrate --trace」は失敗します。
f:\tmp\RubyMine201207>rake db:migrate --trace ** db:migrate を呼び出します (first_time) ** 環境を呼び出します (first_time) ** 環境を実行します ** db:load_config を呼び出します (first_time) ** rails_env を呼び出します (first_time) ** rails_env を実行 ** db:load_config を実行 rake aborted! sqlserver アダプターをインストールしてください:
gem install activerecord-sqlserver-adapte r
(ロードするファイルはありません -- active_record/connection_adapters/sqlserver_adapter)org/jruby/RubyKernel.java:1033:
require' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activesupport-3 .2.1/lib/active_support/dependencies.rb:251:in
require' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236: require' F:/Program Files/ BitNamiload_dependency' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activesupport-3 .2.1/lib/active_support/dependencies.rb:251:in
JRubyStack/jruby/lib/ruby/gems/1.8/gems/activerecord-3. 2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:4 8:resolve_hash_connection' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activerecord-3. 2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:3 9:in
resolve_string_connection' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activerecord-3. 2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:2 3:spec' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activerecord-3. 2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:1 27:in
enstitute_connection' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activerecord-3. 2.1/lib/active_record/railtie.rb:76:inRailtie' org/jruby/RubyKernel.java:2045:in
instance_eval' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activesupport-3 .2.1/lib/active_support/lazy_load_hooks.rb:36:inexecute_hook' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activesupport-3 .2.1/lib/active_support/lazy_load_hooks.rb:43:in
run_load_hooks' org/jruby/RubyArray.java: 1615: ineach' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activesupport-3 .2.1/lib/active_support/lazy_load_hooks.rb:42:in
run_load_hooks' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activerecord-3. 2.1/lib/active_record/base.rb:716:in(root)' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/activerecord-3. 2.1/lib/active_record/base.rb:6:in
(root)' org/jruby/RubyProc.java:270:incall' org/jruby/RubyProc.java:220:in
call' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems /rake-0.9.2.2/lib/rake/task.rb:205:inexecute' org/jruby/RubyArray.java:1615:in
each' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/li b /rake/task.rb:200:inexecute' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/li b/rake/task.rb:158:in
invoke_with_call_chain' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/1.8/monitor.rb:191:inmon_sy nchronize' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/li b/rake/task.rb:151:in
invoke_with_call_chain' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:176:ininvoke_prerequisites' org/jruby/RubyArray.java:1615:in
each' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:ininvoke_prerequisites' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/li b/rake/task.rb:157:in
invoke_with_call_chain' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/1.8 /monitor.rb:191:inmon_sy nchronize' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/li b/rake/task.rb:151:in
invoke_with_call_chain' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:ininvoke' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/li b/rake/application.rb:116:in
invoke_task ' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:intop_level' org/jruby/RubyArray.java:1615:in
each' F:/Program Files/BitNami JRubyStack /jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:intop_level' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/li b/rake/application.rb:133:in
standard_exception_handling' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:intop_level' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/li b/rake/application.rb:66:in
run' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:instandard_exception_handling' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems/1.8/gems/rake-0.9.2.2/li b/rake/application.rb:63:in
run' F:/Program Files/BitNami JRubyStack/jruby/lib/ruby/gems /1.8/gems/rake-0.9.2.2/bin/rake:33:in(root)' org/jruby/RubyKernel.java:1058:in
load' F:/Program Files/BitNami JRubyStack/jruby/bin/rake:23:in `(root)' Tasks: TOP => db :migrate => db:load_config