Let's Go!

ruby其他

上一篇 / 下一篇  2011-05-03 16:30:18 / 个人分类:ruby

 

Rails的一键环境配置程序:
Instant Rails - Windows Instant Rails 2.0 

Instant Rails is a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all pre-configured and ready to run.
No installer, you simply drop it into the directory of your choice and run it. It does not modify your system environment.

http://www.cnblogs.com/chenkai/archive/2010/07/07/1773119.html

 

------------------------------------------------------------------------------------------------------------------------------------

ruby版本下载:
http://www.ruby-lang.org/zh_cn/downloads/

linux ror安装:
http://blogold.chinaunix.net/u3/117244/showart_2284853.html

 

三、安装sqlite3-ruby

通过上面两步,sqlite3.exe和sqlite3.dll已经安装到了我们的系统路径中,下面可以安装sqlite3的Ruby接口了。RubyGems上面已经有了这样的接口库,因此:

  D:\>gem install sqlite3-ruby --include-dependencies

很easy吧,现在写个测试程序吧:

# test.rb
require 'sqlite3'

db = SQLite3::Database.new( "test.db" )
db.execute( "select * from Movies" ) {|row| p row}
db.close

运行一下试试吧!

ps: 用惯了MySQL,玩玩sqlite还是挺不错的。

 


TAG:

 

评分:0

我来说两句

Open Toolbar