2008年3月アーカイブ

[INF] ファイアウォール経由での SQL Server との通信に必要な TCP ポート

既定のインスタンスのみの場合は、TCP 1433。
名前付きインスタンスを使用する場合は、UDP 1434も使用する。

カテゴリー:

Home -- restful-authentication -- GitHub

$ ./script/plugin install git://github.com/technoweenie/restful-authentication.git
でrestful-authenticationをインストール後に、 vendor/plugins/restful-authentication を vendor/plugins/restful_authentication にrenameする。 (ディレクトリ名がrestful-authenticationのままだとエラーになるため)

generatorで--statefulを使うために、acts_as_state_machineをインストールする。
Plugins - Acts As State Machine - Agile Web Development

$ ./script/plugin install http://elitists.textdriven.com/svn/plugins/acts_as_state_machine/trunk
generatorで--rspecを使うために、rspecとrspec-railsをインストールする。 (関連エントリー参照) インストール後に、
./script/generate rspec
を忘れずに。

ここまで準備できたら、restful_authenticationのgeneratorを使う。

ZDNet Japan Blog - あとで読むRailsのススメ:restful_authentication

restful_authenticationを触ってみた - idesaku blog

カテゴリー:

カテゴリー:

カテゴリー:

カテゴリー:

カテゴリー:

カテゴリー:

カテゴリー:

カテゴリー:

Rubyでは、C++やJavaのprivateと異なり、サブクラスからでもスーパークラスのprivateメソッドを呼ぶことができる。
Rubyにおけるprotectedとprivateの違いは、レシーバが付けられるかどうかであり、サブクラスから呼べるかどうかではない。
privateメソッドにはレシーバを付けられないので、同じクラスの別のインスタンスのprivateメソッドは呼べない。このような場合にprotectedを使用する。

カテゴリー:

カテゴリー:

PHP Universal Feed Generator (supports RSS 1.0, RSS 2.0 and ATOM) | ajaXray

ATOM、RSS1.0、RSS2.0のフィードを生成するPHPクラスライブラリ。

カテゴリー:

カテゴリー:

カテゴリー:

カテゴリー:

Windows環境で、gemでjsonをインストールしようとしたら、以下のエラーになった。

$ gem install json
Building native extensions.  This could take a while...
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install json
creating Makefile

nmake
'nmake' は、内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。


Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/json-1.1.2 for
 inspection.
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/json-1.1.2/ext/json/ext/parser/
gem_make.out

Visual Studio 2005をインストールしているので、
"C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\vsvars32.bat"
をコマンドプロンプトから実行して環境変数を設定。

※このvsvars32.batはとても便利。ILDasmなどいろいろなツールへのパスを設定してくれる。

再び gem install jsonすると、今度は以下のエラー。

$ gem install json
Building native extensions.  This could take a while...
ERROR:  Error installing json:
        ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install json
creating Makefile

nmake

Microsoft(R) Program Maintenance Utility Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

        c:\ruby\bin\ruby -e "puts 'EXPORTS', 'Init_parser'"  > parser-i386-mswin
32.def
        cl -nologo -I. -Ic:/ruby/lib/ruby/1.8/i386-mswin32 -Ic:/ruby/lib/ruby/1.
8/i386-mswin32 -I. -MD -Zi -O2b2xg- -G6  -c -Tcparser.c
cl : コマンド ライン warning D9035 : オプション 'Og-' の使用は現在推奨されていま
せん。今後のバージョンからは削除されます。
cl : コマンド ライン warning D9002 : 不明なオプション '-G6' を無視します
parser.c
c:\ruby\lib\ruby\1.8\i386-mswin32\config.h(2) : fatal error C1189: #error :  MSC
 version unmatch
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.EXE"' :
Stop.


Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/json-1.1.2 for
 inspection.
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/json-1.1.2/ext/json/ext/parser/
gem_make.out

fatal error が発生しているc:\ruby\lib\ruby\1.8\i386-mswin32\config.hを修正。
ぼくの環境のcl.exeのバージョンは、14.00.50727.762なので、

#if _MSC_VER != 1200
#error MSC version unmatch
#endif

を、

#if _MSC_VER < 1200
#error MSC version unmatch
#endif

に修正すると、無事インストール完了!

参考: 2008-02-03 - mallowlabsの備忘録

カテゴリー:

カテゴリー:

カテゴリー:

カテゴリー:

カテゴリー:

1  2

このアーカイブについて

このページには、2008年3月に書かれたブログ記事が新しい順に公開されています。

前のアーカイブは2008年2月です。

次のアーカイブは2008年4月です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。