2010年12月8日水曜日

ruby1.9.2 + qtbindings 4.6.3.2 x86-mingw32 update 


qtbindingsが4.6.3.2にupdateされてました。
utf-8にて実行しました。

今回のupdateでutf-8でも文字化けがおきてません。
sjis,utf-8nでも文字化けがおきません。
携わっておられる方々に感謝です。


2010年11月28日日曜日

Lubuntu 10.10 インストール

旧型PCにLubuntu 10.10 をインストール
CPU:AMD 2400+
MB:M7NBA
MEM:PC3200-512MBX2
VIDEO:R9200LE
HDD:Maxtor 120GB ATA/133
http://lubuntu.net/blog/lubuntu-1010-released
Lubutnuを入れる。手測ですが、起動時間は
lubuntu 10.10 約0分39秒(bios起動時間15秒含む) shoutdown4秒
Japanese Teamのパッケージレポジトリを追加する
日本語 Remix CDに追加されているパッケージと同じものをインストールする。
[設定]-[日本語環境セットアップヘルパ]から
adobe flash player plag-in(firefox)
adobe acrobat
色々なフォントを入れる

2010年11月11日木曜日

SharpDevelop3.2.1 update


RUBY_VERSIONが1.9.2に
スタートオプションも変わってます。

2010年10月30日土曜日

ruby1.8.7 + gtk2-0.90.5 demo button Boxes


ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

C:\Documents and Settings\takashi>cd C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.5-x86-mingw32\sample\gtk-demo

C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.5-x86-mingw32\sample\gtk-demo>ruby -rubygems main.rb


ruby1.9.2 + gtk2-0.90.5 gtk_demo:main.rb no such file to load

ruby1.9.2に gtk2-0.90.5を入れたのですがgtk_demo:main.rbでWidget(double click for demo)を
の項目をdouble clickするとin `require': no such file to load -- となります。

ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

C:\Documents and Settings\takashi>gem install gtk2
Temporarily enhancing PATH to include DevKit...
Successfully installed pkg-config-1.0.7
Successfully installed cairo-1.10.0-x86-mingw32
Successfully installed glib2-0.90.2-x86-mingw32
Successfully installed pango-0.90.2-x86-mingw32
Successfully installed atk-0.90.2-x86-mingw32
Successfully installed gtk2-0.90.2-x86-mingw32
6 gems installed
Installing ri documentation for pkg-config-1.0.7...
Installing ri documentation for cairo-1.10.0-x86-mingw32...

RDoc::Parser::Ruby failure around line 131 of
lib/cairo.rb

Before reporting this, could you check that the file you're documenting
compiles cleanly--RDoc is not a full Ruby parser, and gets confused easily if
fed invalid programs.

The internal error was:

(RDoc::Error) Name or symbol expected (got #)

ERROR: While generating documentation for cairo-1.10.0-x86-mingw32
... MESSAGE: Name or symbol expected (got #)
... RDOC args: lib
(continuing with the rest of the installation)
Installing ri documentation for glib2-0.90.2-x86-mingw32...
Installing ri documentation for pango-0.90.2-x86-mingw32...
Installing ri documentation for atk-0.90.2-x86-mingw32...
Installing ri documentation for gtk2-0.90.2-x86-mingw32...
Installing RDoc documentation for pkg-config-1.0.7...
Installing RDoc documentation for cairo-1.10.0-x86-mingw32...

RDoc::Parser::Ruby failure around line 131 of
lib/cairo.rb

Before reporting this, could you check that the file you're documenting
compiles cleanly--RDoc is not a full Ruby parser, and gets confused easily if
fed invalid programs.

The internal error was:

(RDoc::Error) Name or symbol expected (got #)

ERROR: While generating documentation for cairo-1.10.0-x86-mingw32
... MESSAGE: Name or symbol expected (got #)
... RDOC args: lib
(continuing with the rest of the installation)
Installing RDoc documentation for glib2-0.90.2-x86-mingw32...
Installing RDoc documentation for pango-0.90.2-x86-mingw32...
Installing RDoc documentation for atk-0.90.2-x86-mingw32...
Installing RDoc documentation for gtk2-0.90.2-x86-mingw32...

C:\Documents and Settings\takashi>cd C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo

C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>ruby main.rb
:29:in `require': no such file to load -- gdk_pixbuf2 (LoadError)
from :29:in `require'
from C:/ruby/Ruby192/lib/ruby/gems/1.9.1/gems/gtk2-0.90.2-x86-mingw32/lib/gtk2/base.rb:27:in `'
from :29:in `require'
from :29:in `require'
from C:/ruby/Ruby192/lib/ruby/gems/1.9.1/gems/gtk2-0.90.2-x86-mingw32/lib/gtk2.rb:11:in `'
from :33:in `require'
from :33:in `rescue in require'
from :29:in `require'
from main.rb:11:in `
'

C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>gem install gdk_pixbuf2
Temporarily enhancing PATH to include DevKit...
Successfully installed glib2-0.90.5-x86-mingw32
Successfully installed gdk_pixbuf2-0.90.5-x86-mingw32
2 gems installed
Installing ri documentation for glib2-0.90.5-x86-mingw32...
Installing ri documentation for gdk_pixbuf2-0.90.5-x86-mingw32...
Installing RDoc documentation for glib2-0.90.5-x86-mingw32...
Installing RDoc documentation for gdk_pixbuf2-0.90.5-x86-mingw32...

C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>ruby main.rb
C:/ruby/Ruby192/lib/ruby/1.9.1/rubygems.rb:238:in `activate': can't activate glib2 (>= 0.90.5, runtime) for ["gdk_pixbuf2-0.90.5
-x86-mingw32"], already activated glib2-0.90.2-x86-mingw32 for ["gtk2-0.90.2-x86-mingw32"] (Gem::LoadError)
from C:/ruby/Ruby192/lib/ruby/1.9.1/rubygems.rb:254:in `block in activate'
from C:/ruby/Ruby192/lib/ruby/1.9.1/rubygems.rb:253:in `each'
from C:/ruby/Ruby192/lib/ruby/1.9.1/rubygems.rb:253:in `activate'
from C:/ruby/Ruby192/lib/ruby/1.9.1/rubygems.rb:1119:in `try_activate'
from :32:in `rescue in require'
from :29:in `require'
from C:/ruby/Ruby192/lib/ruby/gems/1.9.1/gems/gtk2-0.90.2-x86-mingw32/lib/gtk2/base.rb:27:in `'
from :29:in `require'
from :29:in `require'
from C:/ruby/Ruby192/lib/ruby/gems/1.9.1/gems/gtk2-0.90.2-x86-mingw32/lib/gtk2.rb:11:in `'
from :33:in `require'
from :33:in `rescue in require'
from :29:in `require'
from main.rb:11:in `
'

C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>gem update
Updating installed gems
Updating atk
Temporarily enhancing PATH to include DevKit...
Successfully installed atk-0.90.5-x86-mingw32
Updating gtk2
Successfully installed pango-0.90.5-x86-mingw32
Successfully installed gtk2-0.90.5-x86-mingw32
Updating minitest
Successfully installed minitest-1.7.2
Updating rdoc
RDoc 2.5 did not save method parameters, so you should upgrade your rdoc-data
gem to a version >= 2.5.3.

To have ri data for core and stdlib you'll need to:

gem install rdoc-data

then run:

rdoc-data --install

To have ri data for you gems you'll also need to run:

gem rdoc --all --overwrite

If you don't want to rebuild the rdoc for `gem server`, add --no-rdoc.
Successfully installed rdoc-2.5.11
Gems updated: atk, pango, gtk2, minitest, rdoc
Installing ri documentation for atk-0.90.5-x86-mingw32...
Installing ri documentation for pango-0.90.5-x86-mingw32...
Installing ri documentation for gtk2-0.90.5-x86-mingw32...
Installing ri documentation for minitest-1.7.2...
Installing ri documentation for rdoc-2.5.11...
Installing RDoc documentation for atk-0.90.5-x86-mingw32...
Installing RDoc documentation for pango-0.90.5-x86-mingw32...
Installing RDoc documentation for gtk2-0.90.5-x86-mingw32...
Installing RDoc documentation for minitest-1.7.2...
Installing RDoc documentation for rdoc-2.5.11...

C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>cd C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk
2-0.90.5-x86-mingw32\sample\gtk-demo

C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.5-x86-mingw32\sample\gtk-demo>ruby main.rb
:29:in `require': no such file to load -- changedisplay.rb
from :29:in `require'
from main.rb:212:in `row_activated_cb'
from main.rb:182:in `block in create_tree'
from main.rb:380:in `call'
from main.rb:380:in `main'
from main.rb:380:in `
'

C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.5-x86-mingw32\sample\gtk-demo>ruby main.rb
:29:in `require': no such file to load -- clipboard.rb
from :29:in `require'
from main.rb:212:in `row_activated_cb'
from main.rb:182:in `block in create_tree'
from main.rb:380:in `call'
from main.rb:380:in `main'
from main.rb:380:in `
'

C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.5-x86-mingw32\sample\gtk-demo>ruby main.rb
:29:in `require': no such file to load -- button_box.rb
from :29:in `require'
from main.rb:212:in `row_activated_cb'
from main.rb:182:in `block in create_tree'
from main.rb:380:in `call'
from main.rb:380:in `main'
from main.rb:380:in `
'

C:\ruby\Ruby192\lib\ruby\gems\1.9.1\gems\gtk2-0.90.5-x86-mingw32\sample\gtk-demo>

ruby1.8.7 + gtk2-0.90.5

gtk2を入れなおした。gtk2-0.90.5で.4でのエラーが取れている。

ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

C:\Documents and Settings\takashi>gem update
Updating installed gems
Nothing to update

C:\Documents and Settings\takashi>gem list

*** LOCAL GEMS ***

qtbindings (4.6.3.1 x86-mingw32)

C:\Documents and Settings\takashi>gem install gtk2
Temporarily enhancing PATH to include DevKit...
Successfully installed pkg-config-1.0.7
Successfully installed cairo-1.10.0-x86-mingw32
Successfully installed glib2-0.90.2-x86-mingw32
Successfully installed pango-0.90.2-x86-mingw32
Successfully installed atk-0.90.2-x86-mingw32
Successfully installed gtk2-0.90.2-x86-mingw32
6 gems installed
Installing ri documentation for pkg-config-1.0.7...
Installing ri documentation for cairo-1.10.0-x86-mingw32...
Installing ri documentation for glib2-0.90.2-x86-mingw32...
Installing ri documentation for pango-0.90.2-x86-mingw32...
Installing ri documentation for atk-0.90.2-x86-mingw32...
Installing ri documentation for gtk2-0.90.2-x86-mingw32...
Installing RDoc documentation for pkg-config-1.0.7...
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
Installing RDoc documentation for cairo-1.10.0-x86-mingw32...
Could not find main page README.txt
Could not find main page README.txt
Could not find main page README.txt
Could not find main page README.txt
Installing RDoc documentation for glib2-0.90.2-x86-mingw32...
Installing RDoc documentation for pango-0.90.2-x86-mingw32...
Installing RDoc documentation for atk-0.90.2-x86-mingw32...
Installing RDoc documentation for gtk2-0.90.2-x86-mingw32...

C:\Documents and Settings\takashi>cd C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo

C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>ruby -rubygems main.rb
C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- gdk_pixb
uf2 (LoadError)
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/ruby/Ruby187/lib/ruby/gems/1.8/gems/gtk2-0.90.2-x86-mingw32/lib/gtk2/base.rb:27
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/ruby/Ruby187/lib/ruby/gems/1.8/gems/gtk2-0.90.2-x86-mingw32/lib/gtk2.rb:11
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from main.rb:11

C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>gem install gdk_pixbuf2
Temporarily enhancing PATH to include DevKit...
Successfully installed glib2-0.90.5-x86-mingw32
Successfully installed gdk_pixbuf2-0.90.5-x86-mingw32
2 gems installed
Installing ri documentation for glib2-0.90.5-x86-mingw32...
Installing ri documentation for gdk_pixbuf2-0.90.5-x86-mingw32...
Installing RDoc documentation for glib2-0.90.5-x86-mingw32...
Installing RDoc documentation for gdk_pixbuf2-0.90.5-x86-mingw32...

C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>gem list

*** LOCAL GEMS ***

atk (0.90.2 x86-mingw32)
cairo (1.10.0 x86-mingw32)
gdk_pixbuf2 (0.90.5 x86-mingw32)
glib2 (0.90.5 x86-mingw32, 0.90.2 x86-mingw32)
gtk2 (0.90.2 x86-mingw32)
pango (0.90.2 x86-mingw32)
pkg-config (1.0.7)
qtbindings (4.6.3.1 x86-mingw32)

C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>ruby -rubygems main.rb
C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:233:in `activate': can't activate glib2 (>= 0.90.5, runtime) for ["gdk_pixbuf
2-0.90.5-x86-mingw32"], already activated glib2-0.90.2-x86-mingw32 for ["gtk2-0.90.2-x86-mingw32"] (Gem::LoadError)
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:35:in `require'
from C:/ruby/Ruby187/lib/ruby/gems/1.8/gems/gtk2-0.90.2-x86-mingw32/lib/gtk2/base.rb:27
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/ruby/Ruby187/lib/ruby/gems/1.8/gems/gtk2-0.90.2-x86-mingw32/lib/gtk2.rb:11
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from main.rb:11

C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>gem update
Updating installed gems
Updating atk
Temporarily enhancing PATH to include DevKit...
Successfully installed atk-0.90.5-x86-mingw32
Updating gtk2
Successfully installed pango-0.90.5-x86-mingw32
Successfully installed gtk2-0.90.5-x86-mingw32
Gems updated: atk, pango, gtk2
Installing ri documentation for atk-0.90.5-x86-mingw32...
Installing ri documentation for pango-0.90.5-x86-mingw32...
Installing ri documentation for gtk2-0.90.5-x86-mingw32...
Installing RDoc documentation for atk-0.90.5-x86-mingw32...
Installing RDoc documentation for pango-0.90.5-x86-mingw32...
Installing RDoc documentation for gtk2-0.90.5-x86-mingw32...

C:\>cd C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.5-x86-mingw32\sample\gtk-demo

C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.5-x86-mingw32\sample\gtk-demo>ruby -rubygems main.rb

ruby1.9.2 + qtbindings (4.6.3.1 x86-mingw32)


C:\rubyapi\Qt4>ruby -v
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

C:\rubyapi\Qt4>gem list

*** LOCAL GEMS ***

minitest (1.6.0)
qtbindings (4.6.3.1 x86-mingw32)
rake (0.8.7)
rdiscount (1.6.5)
rdoc (2.5.8)
tk-win (0.2.2 x86-mingw32)

C:\rubyapi\Qt4>ruby gui_qtruby_spl1_sjis.rb

C:\rubyapi\Qt4>ruby gui_qtruby_spl1_utf8.rb

#####gui_qtruby_spl1_utf8.rb
#!ruby -Ku
# -*- coding:utf-8 -*-
require 'Qt4'

app = Qt::Application.new(ARGV)

#hello = Qt::PushButton.new('Hello World!')
hello = Qt::Label.new('こんにちは、世界!')
hello.window_title = 'Hello World! QtRuby utf-8'
hello.resize(260, 60)
hello.show()

app.exec()

####gui_qtruby_spl1_sjis.rb
#!ruby -Ks
# -*- coding:shift_jis -*-
require 'Qt4'

app = Qt::Application.new(ARGV)

#hello = Qt::PushButton.new('Hello World!')
hello = Qt::Label.new('こんにちは、世界!')
hello.window_title = 'Hello World! QtRuby shift_jis'
hello.resize(260, 60)
hello.show()

app.exec()

ruby1.9.2 + qtbindings
shift_jisは漢字表示できるのにutf-8 文字化けします。

ruby1.8.7 + qtbindings
shift_jisはSegmentation fault、utf-8 漢字表示できます。
C:\rubyapi\Qt4>ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

C:\rubyapi\Qt4>ruby -rubygems gui_qtruby_spl1_sjis.rb
C:/ruby/Ruby187/lib/ruby/gems/1.8/gems/qtbindings-4.6.3.1-x86-mingw32/lib/Qt/qtruby4.rb:2640: [BUG] Segmentation fault
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]


This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

C:\rubyapi\Qt4>ruby -rubygems gui_qtruby_spl1_utf8.rb

C:\rubyapi\Qt4>


2010年10月23日土曜日

ironruby 1.1.1 release

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\takashi>ir -v
IronRuby 1.1.1.0 on .NET 4.0.30319.1

C:\Documents and Settings\takashi>ir
IronRuby 1.1.1.0 on .NET 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.

>>> RUBY_VERSION
=> "1.9.2"
>>>

2010年10月20日水曜日

IronRuby Accessのテーブル一覧をDataGridViewで表示する

DataGridViewとTextBoxをFormに配置したあとに
⑤menuStripをToolStripContainerの左上に配置する。
 [ここへ入力]に"Open(&O)"を入力する。
 Openをダブルクリック
 def OpenOToolStripMenuItemClick(sender, e)
 endをコード化する
("開く"と入力するとdef 開くOToolStripMenuItemClick(sender, e)となる)
この後、プロパティ:表示:Text"開く(&O)"を入れる
⑥OpenFileDialogをWindowsフォーム上にドラッグする。
 プロパティ:動作:ReadOnlyCheck[True]
RestoreDirectory[[rue]
プロパティ:動作:Filter["Access File (*.mdb)|*.mdb|すべてのファイル (*.*)|*.*"]を入力する。

⑦ def OpenOToolStripMenuItemClick(sender, e)
  の中を記載する。

MsAccessのmdbは
ir.exe -Ku Program.rbにて実行

#Program.rb
require "mscorlib"
require "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
require "System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
require "MainForm"

Application = System::Windows::Forms::Application

Application.EnableVisualStyles()
form = MainForm.new()
Application.Run(form)

#MainForm.rb
require "mscorlib"
require "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
require "System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
require "System.Data"

class MainForm < System::Windows::Forms::Form
def initialize()
self.InitializeComponent()
end

def InitializeComponent()
@toolStripContainer1 = System::Windows::Forms::ToolStripContainer.new()
@splitContainer1 = System::Windows::Forms::SplitContainer.new()
@dataGridView1 = System::Windows::Forms::DataGridView.new()
@textBox1 = System::Windows::Forms::TextBox.new()
@menuStrip1 = System::Windows::Forms::MenuStrip.new()
@openOToolStripMenuItem = System::Windows::Forms::ToolStripMenuItem.new()
@openFileDialog1 = System::Windows::Forms::OpenFileDialog.new()
@toolStripContainer1.ContentPanel.SuspendLayout()
@toolStripContainer1.TopToolStripPanel.SuspendLayout()
@toolStripContainer1.SuspendLayout()
@splitContainer1.Panel1.SuspendLayout()
@splitContainer1.Panel2.SuspendLayout()
@splitContainer1.SuspendLayout()
@dataGridView1.clr_member(System::ComponentModel::ISupportInitialize, :BeginInit).call()
@menuStrip1.SuspendLayout()
self.SuspendLayout()
#
# toolStripContainer1
#
#
# toolStripContainer1.ContentPanel
#
@toolStripContainer1.ContentPanel.Controls.Add(@splitContainer1)
@toolStripContainer1.ContentPanel.Size = System::Drawing::Size.new(488, 242)
@toolStripContainer1.Dock = System::Windows::Forms::DockStyle.Fill
@toolStripContainer1.Location = System::Drawing::Point.new(0, 0)
@toolStripContainer1.Name = "toolStripContainer1"
@toolStripContainer1.Size = System::Drawing::Size.new(488, 266)
@toolStripContainer1.TabIndex = 0
@toolStripContainer1.Text = "toolStripContainer1"
#
# toolStripContainer1.TopToolStripPanel
#
@toolStripContainer1.TopToolStripPanel.Controls.Add(@menuStrip1)
#
# splitContainer1
#
@splitContainer1.Dock = System::Windows::Forms::DockStyle.Fill
@splitContainer1.Location = System::Drawing::Point.new(0, 0)
@splitContainer1.Name = "splitContainer1"
@splitContainer1.Orientation = System::Windows::Forms::Orientation.Horizontal
#
# splitContainer1.Panel1
#
@splitContainer1.Panel1.Controls.Add(@dataGridView1)
#
# splitContainer1.Panel2
#
@splitContainer1.Panel2.Controls.Add(@textBox1)
@splitContainer1.Size = System::Drawing::Size.new(488, 242)
@splitContainer1.SplitterDistance = 97
@splitContainer1.TabIndex = 0
#
# dataGridView1
#
@dataGridView1.ColumnHeadersHeightSizeMode = System::Windows::Forms::DataGridViewColumnHeadersHeightSizeMode.AutoSize
@dataGridView1.Dock = System::Windows::Forms::DockStyle.Fill
@dataGridView1.Location = System::Drawing::Point.new(0, 0)
@dataGridView1.Name = "dataGridView1"
@dataGridView1.RowTemplate.Height = 21
@dataGridView1.Size = System::Drawing::Size.new(488, 97)
@dataGridView1.TabIndex = 0
#
# textBox1
#
@textBox1.Dock = System::Windows::Forms::DockStyle.Fill
@textBox1.Location = System::Drawing::Point.new(0, 0)
@textBox1.Multiline = true
@textBox1.Name = "textBox1"
@textBox1.ScrollBars = System::Windows::Forms::ScrollBars.Both
@textBox1.Size = System::Drawing::Size.new(488, 141)
@textBox1.TabIndex = 0
#
# menuStrip1
#
@menuStrip1.Dock = System::Windows::Forms::DockStyle.None
@menuStrip1.Items.AddRange(System::Array[System::Windows::Forms::ToolStripItem].new(
[@openOToolStripMenuItem]))
@menuStrip1.Location = System::Drawing::Point.new(0, 0)
@menuStrip1.Name = "menuStrip1"
@menuStrip1.Size = System::Drawing::Size.new(488, 24)
@menuStrip1.TabIndex = 0
@menuStrip1.Text = "menuStrip1"
#
# openOToolStripMenuItem
#
@openOToolStripMenuItem.Name = "openOToolStripMenuItem"
@openOToolStripMenuItem.Size = System::Drawing::Size.new(51, 20)
@openOToolStripMenuItem.Text = "開く(&O)"
@openOToolStripMenuItem.Click { |sender, e| self.OpenOToolStripMenuItemClick(sender, e) }
#
# openFileDialog1
#
@openFileDialog1.FileName = "openFileDialog1"
@openFileDialog1.Filter = "Access File (*.mdb)|*.mdb|すべてのファイル (*.*)|*.*"
@openFileDialog1.ReadOnlyChecked = true
@openFileDialog1.RestoreDirectory = true
@openFileDialog1.FileOk { |sender, e| self.OpenFileDialog1FileOk(sender, e) }
#
# MainForm
#
self.ClientSize = System::Drawing::Size.new(488, 266)
self.Controls.Add(@toolStripContainer1)
self.MainMenuStrip = @menuStrip1
self.Name = "MainForm"
self.Text = "rubyma_access"
@toolStripContainer1.ContentPanel.ResumeLayout(false)
@toolStripContainer1.TopToolStripPanel.ResumeLayout(false)
@toolStripContainer1.TopToolStripPanel.PerformLayout()
@toolStripContainer1.ResumeLayout(false)
@toolStripContainer1.PerformLayout()
@splitContainer1.Panel1.ResumeLayout(false)
@splitContainer1.Panel2.ResumeLayout(false)
@splitContainer1.Panel2.PerformLayout()
@splitContainer1.ResumeLayout(false)
@dataGridView1.clr_member(System::ComponentModel::ISupportInitialize, :EndInit).call()
@menuStrip1.ResumeLayout(false)
@menuStrip1.PerformLayout()
self.ResumeLayout(false)
end

def OpenOToolStripMenuItemClick(sender, e)
if @openFileDialog1.ShowDialog() == System::Windows::Forms::DialogResult.OK then
@openFileDialog1.FileNames.each do |filename| #ファイルごとに処理をする
@textBox1.AppendText( System::Environment.NewLine)
@textBox1.AppendText( filename + "\r\n")
begin
#接続文字列の取得
strDBConnection = "Provider=Microsoft.Jet.OLEDB.4.0" + ";Data Source=" + filename + ";User Id=admin" + ";Password="
#DBコネクションの生成
conn = System::Data::OleDb::OleDbConnection.new(strDBConnection)
#接続処理
conn.Open()
# C# schemaTable = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new Object[] {null, null, null, "TABLE"});
schemaTable = conn.GetOleDbSchemaTable(System::Data::OleDb::OleDbSchemaGuid.Tables, System::Array[System::String].new([nil,nil,nil,"TABLE"]))
@dataGridView1.DataSource = schemaTable # dataGridViewに表示
@textBox1.AppendText("テーブル一覧を取得しました" + "\r\n")
conn.Close()
rescue Exception => e
@textBox1.AppendText("Connect Error:" + e.Message + "\r\n")
ensure
end
end
end
end

def OpenFileDialog1FileOk(sender, e)
end
end

IronRuby(Sharpdevelop) DataGridViewコントロール




DataGridViewとTextBoxをFormに配置する。
@IT

特集.NET Framework 2.0のWindowsフォーム新機能(後編)新グリッド・コントロールの豊富な機能と高い表現力を参考にして。

SharpDevelop3.2にて

①ToolStripContainerをWindowsフォーム上に配置する。 

[フォームを四辺にドッキングする](プロパティ:配置:Dock[Fill])

②SplitContainerをToolStripContainerの上に配置する。 

[上下分割の方向]にする(Orentation[Horizontal]) [親コンテナにドッキングする](プロパティ:配置:Dock[Fill])

③DataGridViewをSplitContainerのPanel1の上に配置する。

 [親コンテナにドッキングする](プロパティ:配置:Dock[Fill])

④TextBoxをSplitContainerのPanel2の上に配置する。

 [MultiLine]にチェックを入れる プロパティにて配置:Dockを[Fill]

表示:ScrollBarsを[Both]にする

2010年10月14日木曜日

Komodo Edit6

Check Configuration
LangageFeatures
Default Ruby Interpreter
Project>New Project> Project名を登録
tktest.rbを選択した。
Tools>Runcommandに
c:\ruby\ruby192\bin\ruby.exe %Fを入力する
runさせると、
Commad Outputにコンソール出力される。


























QtRuby qtbindings



qtbindings provides ruby bindings to QT4.x. It is derived from the kdebindings project.

C:\ruby>ruby -vruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
C:\ruby>gem list
*** LOCAL GEMS ***
atk (0.90.2 x86-mingw32)
cairo (1.10.0 x86-mingw32)
gdk_pixbuf2 (0.90.2 x86-mingw32)
glib2 (0.90.2 x86-mingw32)
gtk2 (0.90.2 x86-mingw32)
pango (0.90.2 x86-mingw32)
pkg-config (1.0.6)
poppler (0.90.2 x86-mingw32)
qtruby4 (2.1.0 mswin32)
rake (0.8.7)
rsvg2 (0.90.2 x86-mingw32)


-------qtruby4をgem uninstallしてもruby187\binの下のqt**のファイルがあると----
-------qtbindingsが動かなかったのでruby187を再インストールする-----

C:\ruby>rename ruby187 ruby187_old


-----rubyinstaller-1.8.7-p302.exeをインストール-----

C:\ruby>cd DevKit
C:\ruby\DevKit>ruby dk.rb init

[INFO] found RubyInstaller v1.8.7 at C:/ruby/Ruby187
[INFO] found RubyInstaller v1.9.1 at C:/ruby/Ruby191
[INFO] found RubyInstaller v1.9.2 at C:/ruby/Ruby192
Initialization complete! Please review and modify the auto-generated'config.yml' file to ensure it contains the root directories to allof the installed Rubies you want enhanced by the DevKit.
C:\ruby\DevKit>ruby dk.rb review

Based upon the settings in the 'config.yml' file generatedfrom running 'ruby dk.rb init' and any of your customizations,DevKit functionality will be injected into the following Rubieswhen you run 'ruby dk.rb install'.
C:/ruby/Ruby187

C:/ruby/Ruby191

C:/ruby/Ruby192
C:\ruby\DevKit>ruby dk.rb install

[INFO] Installing C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/defaults/operating_system.rb

[INFO] Installing C:/ruby/Ruby187/lib/ruby/site_ruby/devkit.rb

[INFO] RubyGems override already in place for C:/ruby/Ruby191, skipping.

[WARN] DevKit helper library already exists for C:/ruby/Ruby191, skipping.

[INFO] RubyGems override already in place for C:/ruby/Ruby192, skipping.

[WARN] DevKit helper library already exists for C:/ruby/Ruby192, skipping.
C:\ruby\DevKit>gem install qtbindingsTemporarily enhancing PATH to include DevKit...Successfully installed qtbindings-4.6.3.1-x86-mingw321 gem installedInstalling ri documentation for qtbindings-4.6.3.1-x86-mingw32...Installing RDoc documentation for qtbindings-4.6.3.1-x86-mingw32...
C:\ruby\DevKit>rbrcc -version

Ruby Resource Compiler for Qt version 4.6.3
C:\ruby\DevKit>rbuic4 -v

Qt User Interface Compiler version 4.6.3
C:\ruby\DevKit>rbqtapi -v

QtRuby 2.0.5 using Qt-4.6.3
C:\ruby\DevKit>gem list
*** LOCAL GEMS ***
qtbindings (4.6.3.1 x86-mingw32)
------examplesのcalculatorbuilderとcalculatorformをnmakeした------
C:\ruby\DevKit>cd C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\qtbindings-4.6.3.1-x86-mingw32\examples\designer\calculatorbuilder
C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\qtbindings-4.6.3.1-x86-mingw32\examples\designer\calculatorbuilder>nmake
Microsoft (R) Program Maintenance Utility Version 1.50Copyright (c) Microsoft Corp 1988-94. All rights reserved.
rbrcc calculatorbuilder.qrc -o qrc_calculatorbuilder.rb
C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\qtbindings-4.6.3.1-x86-mingw32\examples\designer\calculatorbuilder>cd ..
C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\qtbindings-4.6.3.1-x86-mingw32\examples\designer>cd calculatorform
C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\qtbindings-4.6.3.1-x86-mingw32\examples\designer\calculatorform>nmake
Microsoft (R) Program Maintenance Utility Version 1.50Copyright (c) Microsoft Corp 1988-94. All rights reserved.
rbuic4 calculatorform.ui -o ui_calculatorform.rb
C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\qtbindings-4.6.3.1-x86-mingw32\examples\designer\calculatorform>cd ..
C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\qtbindings-4.6.3.1-x86-mingw32\examples\designer>cd ..


----examplesのrun_allを動かしてみる-----

C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\qtbindings-4.6.3.1-x86-mingw32\examples>ruby run_all.rb

running: cd designer\calculatorbuilder && ruby -rubygems main.rbrunning: cd designer\calculatorform && ruby -rubygems main.rb
----qtruby4ではerrorだったscreenshotが動いている----

running: cd desktop\screenshot && ruby -rubygems main.rbrunning: cd desktop\systray && ruby -rubygems main.rbC:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- ./qrc_systray.rb (LoadError) from C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from main.rb:27running: cd dialogs\complexwizard && ruby -rubygems main.rb

*************************************************************************
ruby1.9.2でもgem install qtbindingsしたが漢字が化けたり,
examplesは動作したがexamples以外のdirでやるとrequire 'example.rb'などでloaderrorとなったりする。

2010年10月13日水曜日

旧型機(2)にLubuntu10.10をインストール


processor Intel(R) Pentium(R) 4 CPU 2.00GHz
mother AOpen AX4G Pro
memory 768MB SDRAM
disk 20GB SAMSUNG SV0221N
(ubuntu 10.04 GNOME 約1分05秒(bios起動時間約13秒含む) shoutdown8秒)
lubuntu 10.10 GNOME 約0分46秒(bios起動時間約13秒含む) shoutdown6秒

desktop:~$ free
   total used free shared buffers cached
Mem: 758456 327916 430540 0 27980 205568
-/+ buffers/cache: 94368 664088
Swap: 860156 0 860156

インターネットラジオ SuonoDolceもすんなり聞けました。

2010年10月9日土曜日

ruby1.8.7 + gtk2


C:\rubyapi\gtk>ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

C:\rubyapi\gtk>gem install gtk2

C:\rubyapi\gtk>gem install gdk_pixbuf2

C:\rubyapi\gtk>gem list

*** LOCAL GEMS ***

atk (0.90.2 x86-mingw32)
cairo (1.10.0 x86-mingw32)
gdk_pixbuf2 (0.90.2 x86-mingw32)
glib2 (0.90.2 x86-mingw32)
gtk2 (0.90.2 x86-mingw32)
pango (0.90.2 x86-mingw32)
pkg-config (1.0.6)
poppler (0.90.2 x86-mingw32)
qtruby4 (2.1.0 mswin32)
rake (0.8.7)
rsvg2 (0.90.2 x86-mingw32)

C:\rubyapi\gtk>cd C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo

C:\ruby\Ruby187\lib\ruby\gems\1.8\gems\gtk2-0.90.2-x86-mingw32\sample\gtk-demo>ruby -rubygems main.rb

ruby1.9.2 + tk-win



C:\rubyapi\tk>ruby -v
ruby 1.9.2p0 (2010-08-18) [i386-mingw32]

C:\rubyapi\tk>gem install tk-win
Temporarily enhancing PATH to include DevKit...
Successfully installed tk-win-0.2.2-x86-mingw32
1 gem installed
Installing ri documentation for tk-win-0.2.2-x86-mingw32...
Installing RDoc documentation for tk-win-0.2.2-x86-mingw32...

C:\rubyapi\tk>ruby progressbar.rb

progressbar.rbはRuby/Tk - Ruby/Tk - FrontPageから

2010年10月7日木曜日

Qtruby guiデザイナ


Qtラボジャパン Qtをはじめよう!第13回:GUIデザイナを使おう をQtRubyでやります。

Qt Creator 2.0.1で作ります。但し'close'は'クローズ'でボタンとしました。

C:\Qt\tkwork\example2>rbuic4 example.ui -x -o ui_example.rb
main.rbとexample.rbはコーディング(utf-8n)します。
C:\Qt\tkwork\example2>ruby -Ku main.rb

#main.rb
require 'rubygems'
require 'Qt4'
require 'example.rb'

app = Qt::Application.new(ARGV)
example = Example.new
example.show
app.exec

#example.rb
require 'ui_example.rb'

class Example <>
def initialize(parent = nil)
super
@ui = Ui_Example.new
@ui.setupUi(self)
connect(@ui.button, SIGNAL('clicked()'), $qApp, SLOT('quit()'))
end
end

#ui_example.rb
=begin
** Form generated from reading ui file 'example.ui'
**
** Created: 木 10 7 01:00:48 2010
** by: Qt User Interface Compiler version 4.6.1
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
=end

require 'Qt4'

class Ui_Example
attr_reader :verticalLayout
attr_reader :slider
attr_reader :button

def setupUi(example)
if example.objectName.nil?
example.objectName = "example"
end
example.resize(102, 68)
@verticalLayout = Qt::VBoxLayout.new(example)
@verticalLayout.spacing = 6
@verticalLayout.margin = 11
@verticalLayout.objectName = "verticalLayout"
@slider = Qt::Slider.new(example)
@slider.objectName = "slider"
@slider.orientation = Qt::Horizontal

@verticalLayout.addWidget(@slider)

@button = Qt::PushButton.new(example)
@button.objectName = "button"

@verticalLayout.addWidget(@button)


retranslateUi(example)

Qt::MetaObject.connectSlotsByName(example)
end # setupUi

def setup_ui(example)
setupUi(example)
end

def retranslateUi(example)
example.windowTitle = Qt::Application.translate("Example", "Example", nil, Qt::Application::UnicodeUTF8)
@button.text = Qt::Application.translate("Example", "\343\203\227\343\203\203\343\202\267\343\203\245", nil, Qt::Application::UnicodeUTF8)
end # retranslateUi

def retranslate_ui(example)
retranslateUi(example)
end

end

module Ui
class Example <>
end
end # module Ui

if $0 == __FILE__
a = Qt::Application.new(ARGV)
u = Ui_Example.new
w = Qt::Widget.new
u.setupUi(w)
w.show
a.exec
end






2010年10月4日月曜日

QtRuby \examples\designer\calculatorbuilder


Examplesのcalculatorbuiderがerrorとなります。
C:\rubyapi\Qt4\examples\designer\calculatorbuilder>ruby -rrubygems main.rb./calculatorform.rb:33:in `const_missing': uninitialized constant Qt::UiLoader (NameError) from ./calculatorform.rb:33:in `initialize' from main.rb:31:in `new' from main.rb:31
KDE Techbaseのloading .ui files at runtime with Qt::UIloaderから
main.rbに require 'qtuitools'を追加します。 
require 'Qt'
require 'qtuitools' <= 追加します。
require 'qrc_calculatorbuilder.rb'
require 'calculatorform.rb'
ちなみに
require 'quiloader'はLoadErrorとなります。

2010年8月31日火曜日

RubyInstaller new DevKit

Development KitからDevKit-4.5.0-20100819-1536-sfx.exeをdownloadして、c:\ruby\DevKitに展開する。
C:\ruby\DevKit>ruby dk.rb init
[INFO] found RubyInstaller v1.8.7 at C:/ruby/Ruby187
[INFO] found RubyInstaller v1.9.1 at C:/ruby/Ruby191
[INFO] found RubyInstaller v1.9.2 at C:/ruby/Ruby192

Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.

C:\ruby\DevKit>ruby dk.rb review
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.

C:/ruby/Ruby187
C:/ruby/Ruby191
C:/ruby/Ruby192

C:\ruby\DevKit>ruby dk.rb install
[INFO] Installing C:/ruby/Ruby187/lib/ruby/site_ruby/1.8/rubygems/defaults/operating_system.rb
[INFO] Installing C:/ruby/Ruby187/lib/ruby/site_ruby/devkit.rb
[INFO] Installing C:/ruby/Ruby191/lib/ruby/site_ruby/1.9.1/rubygems/defaults/operating_system.rb
[INFO] Installing C:/ruby/Ruby191/lib/ruby/site_ruby/devkit.rb
[INFO] Installing C:/ruby/Ruby192/lib/ruby/1.9.1/rubygems/defaults/operating_system.rb
[INFO] Installing C:/ruby/Ruby192/lib/ruby/site_ruby/devkit.rb

C:\ruby\DevKit>gem install rdiscount --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed rdiscount-1.6.5
1 gem installed
Installing ri documentation for rdiscount-1.6.5...
Installing RDoc documentation for rdiscount-1.6.5...

C:\ruby\DevKit>ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('**Hello RubyInstaller**').to_html"

Hello RubyInstaller

















2010年8月27日金曜日

SharpDevelop+IronRuby menustripのbug?



menustripにてshortcutkey[Ctrl+O]を設定すると、[ソース]から[デザイン]にすると以下のエラーが出る。

デザイナのロードに失敗。ソースコードのシンタックスエラーと参照が正しいかをチェックしてください
ICSharpCode.FormsDesigner.FormsDesignerLoadException: System.ComponentModel.InvalidEnumArgumentException: 引数値 'value' (79) は列挙型 'Keys' に対して無効です。
ソースコードのShortcutKeysを
@openOToolStripMenuItem.ShortcutKeys = System::Windows::Forms::Keys.Control System::Windows::Forms::Keys.O
OとControlを入れ替える。
@openOToolStripMenuItem.ShortcutKeys = System::Windows::Forms::Keys.O System::Windows::Forms::Keys.Control
[デザイン]画面ではCtrl+LButtonと表示されるが、実行するとCtrl+Oと表示される。

2010年8月4日水曜日

ruby1.8.7+qtruby4


ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]
C:\Documents and Settings\..>gem install qtruby4
Building native extensions. This could take a while...ERROR: Error installing qtruby4: ERROR: Failed to build gem native extension.
rake RUBYARCHDIR=C:/ruby/Ruby187/lib/ruby/gems/1.8/gems/qtruby4-2.1.0-x86-mswin32/lib RUBYLIBDIR=C:/ruby/Ruby187/lib/ruby/gems/1.8/gems/qtruby4-2.1.0-x86-mswin32/lib'rake' は、内部コマンドまたは外部コマンド、操作可能なプログラムまたはバッチ ファイルとして認識されていません。
Gem files will remain installed in C:/ruby/Ruby187/lib/ruby/gems/1.8/gems/qtruby4-2.1.0-x86-mswin32 for inspection.Results logged to C:/ruby/Ruby187/lib/ruby/gems/1.8/gems/qtruby4-2.1.0-x86-mswin32/gem_make.out
C:\Documents and Settings\..>gem install
rake
Successfully installed rake-0.8.71 gem installedInstalling ri documentation for rake-0.8.7...Installing RDoc documentation for rake-0.8.7...
C:\Documents and Settings\..>gem install qtruby4
Building native extensions. This could take a while...Successfully installed qtruby4-2.1.0-x86-mswin321 gem installedInstalling ri documentation for qtruby4-2.1.0-x86-mswin32...Installing RDoc documentation for qtruby4-2.1.0-x86-mswin32...
C:\Documents and Settings\..>gem list
*** LOCAL GEMS ***
qtruby4 (2.1.0 mswin32)
rake (0.8.7)
C:\Documents and Settings\..>
#hello_utf8n.rb
#!/usr/bin/env ruby -Ku
require 'rubygems'
require 'Qt4'
app = Qt::Application.new(ARGV)
label = Qt::Label.new("ハロー Qt!")
label.show()
app.exec()
C:\Documents and Settings\..>ruby hello_utf8n.rb


Ruby pik update  (pik-0.2.8)

>pik update
・・・・・
Successfully installed pik-0.2.8
1 gem installed
Installing ri documentation for pik-0.2.8...
Updating class cache with 0 classes...
Installing RDoc documentation for pik-0.2.8...
Could not find main page README.rdoc
Thank you for using pik.
・・・・・
C:\Documents and Settings\takashi>pik ls -r -V
pik 0.2.8
---
DevKit:
3.4.5r3: http://rubyforge.org/frs/download.php/66888/devkit-3.4.5r3-20091110.7z
IronRuby:
0.3.0: http://rubyforge.org/frs/download.php/53552/ironruby-0.3.0.zip
0.5.0: http://rubyforge.org/frs/download.php/57126/ironruby-0.5.0.zip
0.6.0: http://rubyforge.org/frs/download.php/59717/ironruby-0.6.0.zip
0.9.0: http://rubyforge.org/frs/download.php/61382/ironruby-0.9.0.zip
0.9.1: http://rubyforge.org/frs/download.php/64504/ironruby-0.9.1.zip
0.9.2: http://rubyforge.org/frs/download.php/66606/ironruby-0.9.2.zip
"1.0": http://rubyforge.org/frs/download.php/70179/ironruby-1.0.zip
1.0-rc1: http://rubyforge.org/frs/download.php/67955/ironruby-1.0-rc1.zip
1.0-rc2: http://rubyforge.org/frs/download.php/69180/ironruby-1.0-rc2.zip
1.0.0rc: http://rubyforge.org/frs/download.php/69853/ironruby-1.0.0rc.zip
1.0rc3: http://rubyforge.org/frs/download.php/69665/ironruby-1.0rc3.zip
1.0v4: http://rubyforge.org/frs/download.php/70181/ironruby-1.0v4.zip
JRuby:
1.4.1: http://jruby.org.s3.amazonaws.com/downloads/1.4.1/jruby-bin-1.4.1.zip
1.5.1: http://jruby.org.s3.amazonaws.com/downloads/1.5.1/jruby-bin-1.5.1.zip
Ruby:
1.8.6-p398-2: http://rubyforge.org/frs/download.php/71102/ruby-1.8.6-p398-i386-mingw32-2.7z
1.8.7-p249-1: http://rubyforge.org/frs/download.php/71081/ruby-1.8.7-p249-i386-mingw32-1.7z
1.8.7-p299: http://rubyforge.org/frs/download.php/71493/ruby-1.8.7-p299-i386-mingw32.7z
1.9.1-p378-1: http://rubyforge.org/frs/download.php/71082/ruby-1.9.1-p378-i386-mingw32-1.7z
1.9.1-p429: http://rubyforge.org/frs/download.php/71496/ruby-1.9.1-p429-i386-mingw32.7z
1.9.2-rc1: http://rubyforge.org/frs/download.php/71498/ruby-1.9.2-rc1-i386-mingw32.7z
1.9.2dev-preview3-1: http://rubyforge.org/frs/download.php/71175/ruby-1.9.2dev-preview3-i386-mingw32-1.7z

2010年8月3日火曜日

EditerからIronRubyの実行


SciTEの日本語設定(utf-8)
[Options][Open ruby.properties]
command.go.*.rb=ruby $(FileNameExt)を
command.go *.rb=ir -Ku $(FileNameExt)に変更
[View][Output] を表示する
対象のスクリプトを選択して、F5キーで実行

2010/08/04
Notepad++ プラグインNppExecでは、GUIが表示されなかった。



2010年8月1日日曜日

ruby1.9 + TK

Ruby191\lib\ruby\1.9.1にコピーする。
SpecTclをdownloadする
guibuider-win32-ix86-20070129.exeを実行する。ruby/tkを選択する。
r
bottonをキャンバス?に貼り付けて、ダブルクリックでPropertiesが開くので-textを漢字ボタンに変更した。


Save Asでbottontst名で保存した。
bottontst.ui
bottontst.rb
bottontst_ui.rbのfileができる。
C:\rubyapi\tk\buttontst>ruby -Ku buttontst.rb
C:/rubyapi/tk/buttontst/buttontst_ui.rb:10: warning: variable $KCODE is no longer effective; ignored



>ruby bottonst.rbで実行するには、

#bottontst.rb
# -*- coding: utf-8 -*-を追加

# -*- coding: utf-8 -*-
# buttontst.rb --
#
# UI generated by GUI Builder Build 146 on 2010-08-01 17:21:51 from:
# C:/rubyapi/tk/buttontst/buttontst.ui
# This file is auto-generated. Only the code within
# '# BEGIN USER CODE (global|class)'
# '# END USER CODE (global|class)'
# and code inside the callback defs will be round-tripped.
#

# Add script's directory to lib load path
$:.unshift File.dirname(__FILE__)
require 'buttontst_ui'
require 'tk'

# BEGIN USER CODE global

# END USER CODE global

class Buttontst <>

# BEGIN CALLBACK CODE
# ONLY EDIT CODE INSIDE THE def FUNCTIONS.

# _button_1_command --
#
# Callback to handle _button_1 widget option -command
def _button_1_command(*args)
#<= ここにbutton_1の処理を記載
end

# END CALLBACK CODE

# BEGIN USER CODE class
#<=ここにclass コードを記載
# END USER CODE class
end

# Standalone Code Initialization - DO NOT EDIT
#
if $0 == __FILE__
begin
userinit
rescue NameError
# Ignore userinit not being defined
end
root = Tk.root
root.title('buttontst')
dlg = Buttontst.new(root)

#root.protocol('WM_DELETE_WINDOW', lambda { exit })
begin
run
rescue NameError
# Ignore run not being defined
end
Tk.mainloop
end

#buttontst_ui.rb
読み取り専用のチェックをはずす。
# -*- coding: utf-8 -*-を追加
   $KCODE = 'U'をコメントアウトする。



# -*- coding: utf-8 -*-
# buttontst_ui.rb --
#
# UI generated by GUI Builder Build 146 on 2010-08-01 18:15:30 from:
# C:/rubyapi/tk/buttontst/buttontst.ui
# THIS IS AN AUTOGENERATED FILE AND SHOULD NOT BE EDITED.
# The associated callback file should be modified instead.
#

# Use UTF-8 encoding
#$KCODE = 'U'

require 'tk'

class Buttontst_ui
def initialize(root)
@root = root


# Widget Initialization
@_button_1 = TkButton.new(@root,
'text' => "漢字ボタン"
)

# widget commands

@_button_1.configure(
'command' => lambda { _button_1_command }
)


# Geometry Management
@_button_1.grid(
'in' => @root,
'column' => 1,
'row' => 1,
'columnspan' => 1,
'ipadx' => 0,
'ipady' => 0,
'padx' => 0,
'pady' => 0,
'rowspan' => 1,
'sticky' => ""
)


# Resize Behavior
TkGrid.rowconfigure(@root, 1, 'weight' => 0, 'minsize' => 40, 'pad' => 0)
TkGrid.rowconfigure(@root, 2, 'weight' => 0, 'minsize' => 40, 'pad' => 0)
TkGrid.columnconfigure(@root, 1, 'weight' => 0, 'minsize' => 40, 'pad' => 0)
TkGrid.columnconfigure(@root, 2, 'weight' => 0, 'minsize' => 40, 'pad' => 0)
end
end