14
十二月

sqlite3 使用jdbc 连接  

Posted by Mindlern in

Jruby 使用jdbc 来连接数据库

首先需要这两个GEM
  jdbc-sqlite3
  activerecord-jdbcsqlite3-adapter

gem install jdbc-sqlite3
gem install activerecord-jdbcsqlite3-adapter

使用默认的rails 脚本生成project
定位到config 目录下的database.yml
修改 adapter 这行为jdbcsqlite3
即可使用数据库了

++++++++++
jruby script/server

http://localhost:3000/rails/info/properties
显示正常就表示OK

This entry was posted on 2008年12月14日星期日 at 星期日, 十二月 14, 2008 and is filed under . You can follow any responses to this entry through the comments feed .

0 评论

发表评论