ラベル Cygwin の投稿を表示しています。 すべての投稿を表示
ラベル Cygwin の投稿を表示しています。 すべての投稿を表示

2011年4月18日月曜日

[Ruby] Rubyでtwitter bot作成 1. rubygemのインストール

Rubyの勉強もかねて、Windows 7上でRubyを使ってTwitter botを作ってみる。

最終的にはどこかのサーバ上で自動実行させるようにしたいけど、どんな方法が一番簡単なのかまだわかってないから(Google Appsが良さそう?)、とりあえずPCを起動している間だけ動くようなbotから始めてみる。環境はCygwin/Windows 7。

まずはrubyのパッケージ管理システムrubygemをインストール。

rubygem
http://rubyforge.org/projects/rubygems/

からrubygem-*.zipをダウンロード、解凍。

以下インストール方法とログ。

 
$ ruby setup.rb
cygwin warning:
  MS-DOS style path detected: C:\ProgramData/gemrc
  Preferred POSIX equivalent is: /cygdrive/c/ProgramData/gemrc
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
RubyGems 1.6.2 installed

=== 1.6.2 / 2011-03-08
$
Bug Fixes:

* require of an activated gem could cause activation conflicts.  Fixes
  Bug #29056 by Dave Verwer.
* `gem outdated` now works with up-to-date prerelease gems.




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



RubyGems installed the following executables:

        /usr/bin/gem

これでrubygemがインストールされたことに

 
$ which gem
/usr/bin/gem
 
$ gem -v
1.6.2

今日はとりあえずここまで。次回は多分twitter APIのインストールから。

2011年3月30日水曜日

[Cygwin] Cygwin起動時のWarning

Cygwinをインストールしてみた。インストール自体は(3,40分はかかったけど)問題なかった。ただ起動すると、
 



 Copying skeleton files.
  
 These files are for the user to personalise their cygwin experience.
 They will never be overwritten nor automatically updated.
  
 `./.bashrc' -> `/home/User//.bashrc'
 `./.bash_profile' -> `/home/User//.bash_profile'
 `./.inputrc' -> `/home/User//.inputrc'



  
なるWarning文の様なものが。

単純にC:\cygwin\home\Userにパスを通していなかったから出たもの。「コンピューター」を右クリ→「プロパティ」→「設定の変更」→「詳細設定」タブの「環境変数」→「システム環境変数」のPathを選択して編集→"C:\cygwin\home\User;"を追加。