浙江省高等学校教师教育理论培训

微信搜索“毛凌志岗前心得”小程序

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

jruby -S gem install jdbc-mysql activerecord-jdbcmysql-adapter
java -jar jruby-gems.jar -S rake -T
java -jar jruby-gems.jar -S gem install -i tmp jdbc-mysql activerecord-jdbcmysql-adapter jruby-openssl jdbc-sqlite3 activerecord-jdbcsqlite3-adapter activerecord-jdbchsqldb-adapter activerecord-jdbch2-adapter jdbc-h2 jdbc-hsqldb jdbc-postgres activerecord-jdbcpostgresql-adapter builder
java -jar jruby-gems.jar -S gem install -i tmp buildr
java -jar jruby-gems.jar -S gem update --system -i tmp
rm /home/mlzboy/jruby-gems-jar/tmp/cache/builder-3.0.0.gem
java -jar jruby-gems.jar -S gem install builder -i tmp
java -jar jruby-gems.jar -S gem list|grep build
java -jar jruby-gems.jar -S rake jruby:repackage
  mvn install:install-file -Dfile=/home/mlzboy/jruby-gems-jar/jruby-gems.jar -DgroupId=org.jruby -DartifactId=jruby-all -Dversion=1.6.7.2 -Dpackaging=jar

 

#coding:utf-8
require 'rubygems'
require 'active_record'

ActiveRecord::Base.establish_connection(
:adapter=> "jdbcmysql",
:host => "10.10.10.182",
:database=> "db",
:username => "root",
:password => "yy"
)

class OP < ActiveRecord::Base
  self.table_name="opponent_product"
end

op=OP.last
print op.id

 

 

https://github.com/watkyn/jruby-gems-jar

posted on 2012-05-24 16:30  lexus  阅读(327)  评论(0编辑  收藏  举报