发布时间:2022-08-09 文章分类:编程知识 投稿人:王小丽 字号: 默认 | | 超大 打印
 jruby --version
jruby 1.3.1 (ruby 1.8.6p287) (2009-07-10 6586) (Java HotSpot(TM) Client VM 1.6.0_15) [i386-java]

Install Rake, full JRuby-OpenSSL support, RSpec and ZenTest:

jruby -S gem update --system
jruby -S gem install rake
jruby -S gem install jruby-openssl
jruby -S gem install rspec ZenTest

sudo jruby -S gem install jdbc-[DBNAME]
jdbc-derby
jdbc-h2
jdbc-hsqldb
jdbc-mysql
jdbc-postgres
jdbc-sqlite3

Inside Rails

To use activerecord-jdbc-adapter with JRuby on Rails:

1. Choose the adapter you wish to gem install. The following pre-packaged adapters are available:

2. Run the "jdbc" generator to prepare your Rails application for JDBC.

    jruby script/generate jdbc

uninstall all gems

31. May 2008
edit

To perform batch operations in MacPorts you can use the predefined pseudo-portnames. RubyGems has no such thing, but instead it can handle regular expressions. So to uninstall all gems of your default RubyGems installation you can simply issue the following command.

sudo gem uninstall --a --ignore-dependencies .+