「用語解説」の編集履歴(バックアップ)一覧はこちら

用語解説」(2009/10/25 (日) 13:01:24) の最新版変更点

追加された行は緑色になります。

削除された行は赤色になります。

*&this_page() **RubyGems Rubyのパッケージ管理システム。 >gem search #openclose(show=実行結果){  *** LOCAL GEMS *** actionmailer (2.3.4) actionpack (2.3.4) activerecord (2.3.4) activeresource (2.3.4) activesupport (2.3.4) fxri (0.3.6) fxruby (1.6.16) hpricot (0.6.164) log4r (1.0.5) ptools (1.1.6) rack (1.0.1) rails (2.3.4) rake (0.8.7, 0.8.1) ruby-opengl (0.60.0) sqlite3-ruby (1.2.5) test-unit (2.0.1) win32-api (1.2.1, 1.2.0) win32-clipboard (0.4.4) win32-dir (0.3.2) win32-eventlog (0.5.0) win32-file (0.5.5) win32-file-stat (1.3.1) win32-process (0.5.9) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.2.4) windows-pr (0.9.3) } ***gem ヘルプ >gem -h #openclose(show=実行結果){ RubyGems is a sophisticated package manager for Ruby. This is a basic help message containing pointers to more information.  Usage:   gem -h/--help   gem -v/--version   gem command [arguments...] [options...]  Examples:   gem install rake   gem list --local   gem build package.gemspec   gem help install  Further help:   gem help commands      list all 'gem' commands   gem help examples      show some examples of usage   gem help platforms      show information about platforms   gem help <COMMAND>      show help on COMMAND                   (e.g. 'gem help install')  Further information:   http://rubygems.rubyforge.org } ***gem コマンド一覧 >gem help commands #openclose(show=実行結果){ GEM commands are:   build       Build a gem from a gemspec   cert       Manage RubyGems certificates and signing settings   check       Check installed gems   cleanup      Clean up old versions of installed gems in the local            repository   contents     Display the contents of the installed gems   dependency    Show the dependencies of an installed gem   environment    Display information about the RubyGems environment   fetch       Download a gem and place it in the current directory   generate_index  Generates the index files for a gem server directory   help       Provide help on the 'gem' command   install      Install a gem into the local repository   list       Display gems whose name starts with STRING   lock       Generate a lockdown list of gems   mirror      Mirror a gem repository   outdated     Display all gems that need updates   pristine     Restores installed gems to pristine condition from files            located in the gem cache   query       Query gem information in local or remote repositories   rdoc       Generates RDoc for pre-installed gems   search      Display all gems whose name contains STRING   server      Documentation and gem repository HTTP server   sources      Manage the sources and cache file RubyGems uses to search            for gems   specification   Display gem specification (in yaml)   stale       List gems along with access times   uninstall     Uninstall gems from the local repository   unpack      Unpack an installed gem to the current directory   update      Update the named gems (or all installed gems) in the local            repository   which       Find the location of a library file you can require For help on a particular command, use 'gem help COMMAND'. Commands may be abbreviated, so long as they are unambiguous. e.g. 'gem i rake' is short for 'gem install rake'. } **scaffold 「scaffold」(スキャフォゥド:「足場」という意味) scaffoldを使うと、一連の操作を行うための画面やその裏側の処理を行うプログラムを自動生成できます。 -一覧表示(ページング機能付き) -単票形式のデータ表示 -新規登録 -編集 -削除 ***scaffoldの利用方法 >ruby script/generate scaffold -h #openclose(show=実行結果){ Usage: script/generate scaffold ModelName [field:type, field:type] Options:     --skip-timestamps      Don't add timestamps to the migration file for this model     --skip-migration       Don't generate a migration file for this model     --force-plural        Forces the generation of a plural ModelName Rails Info:   -v, --version          Show the Rails version number and quit.   -h, --help            Show this help message and quit. General Options:   -p, --pretend          Run but do not make any changes.   -f, --force           Overwrite files that already exist.   -s, --skip            Skip files that already exist.   -q, --quiet           Suppress normal output.   -t, --backtrace         Debugging: show backtrace on errors.   -c, --svn            Modify files with subversion. (Note: svn must be in path)   -g, --git            Modify files with git. (Note: git must be in path) Description:   Scaffolds an entire resource, from model and migration to controller and   views, along with a full test suite. The resource is ready to use as a   starting point for your RESTful, resource-oriented application.   Pass the name of the model (in singular form), either CamelCased or   under_scored, as the first argument, and an optional list of attribute   pairs.   Attribute pairs are column_name:sql_type arguments specifying the   model's attributes. Timestamps are added by default, so you don't have to   specify them by hand as 'created_at:datetime updated_at:datetime'.   You don't have to think up every attribute up front, but it helps to   sketch out a few so you can start working with the resource immediately.   For example, 'scaffold post title:string body:text published:boolean'   gives you a model with those three attributes, a controller that handles   the create/show/update/destroy, forms to create and edit your posts, and   an index that lists them all, as well as a map.resources :posts   declaration in config/routes.rb.   If you want to remove all the generated files, run   'script/destroy scaffold ModelName'. Examples:   `./script/generate scaffold post`   `./script/generate scaffold post title:string body:text published:boolean`   `./script/generate scaffold purchase order_id:integer amount:decimal` } **rake Rubyのビルドツール(AntやMake等) ***rake オプション一覧 >rake -h #openclose(show=実行結果){ rake [-f rakefile] {options} targets...   Options are ...   -C, --classic-namespace     Put Task and FileTask in the top level namespace   -D, --describe [PATTERN]     Describe the tasks (matching optional PATTERN), then exit.   -n, --dry-run          Do a dry run without executing actions.   -e, --execute CODE        Execute some Ruby code and exit.   -p, --execute-print CODE     Execute some Ruby code, print the result, then exit.   -E, --execute-continue CODE   Execute some Ruby code, then continue withnormal task processing.   -I, --libdir LIBDIR       Include LIBDIR in the search path for required modules.   -P, --prereqs          Display the tasks and dependencies, then exit.   -q, --quiet           Do not log messages to standard output.   -f, --rakefile [FILE]      Use FILE as the rakefile.   -R, --rakelibdir RAKELIBDIR   Auto-import any .rake files in RAKELIBDIR.(default is 'rakelib')     --rakelib   -r, --require MODULE       Require MODULE before executing rakefile.     --rules           Trace the rules resolution.   -N, --no-search, --nosearch   Do not search parent directories for the Rakefile.   -s, --silent           Like --quiet, but also suppresses the 'in directory' announcement.   -g, --system           Using system wide (global) rakefiles (usually '~/.rake/*.rake').   -G, --no-system, --nosystem   Use standard project Rakefile search paths, ignore system wide rakefiles.   -T, --tasks [PATTERN]      Display the tasks (matching optional PATTERN) with descriptions, then exit.   -t, --trace           Turn on invoke/execute tracing, enable full backtrace.   -v, --verbose          Log message to standard output.   -V, --version          Display the program version.   -h, -H, --help          Display this help message. } ***rake タスク一覧 >rake -T タスク一覧が見られます(注意:-T 小文字じゃだめ) 参考:[[Ruby on Railsでrakeコマンドを使って様々なタスクを実行しよう>http://doruby.kbmj.com/t_article/20090317/_rake_1]] **マイグレーション DBのバージョン管理システム。 具体的には次のような仕組みです。 -db/migrateディレクトリ配下にdb/migrate/20080728204433_create_categories.rbのように、DBに対する変更内容が記述されたファイルを配置 -このとき、各ファイル名の先頭には「20080728204433」の部分のように、タイムスタンプに基づくバージョン情報が付く -マイグレーションは現在のDBのバージョン情報を保持する。これにより、db/migration内のファイルのうち、どれがDBに反映されて、どれが反映されていないかが分かる -「db:migrate」というrakeタスク(「make install」のようなバッチ処理をイメージすると分かりやすい)を実行して、未反映の変更をDBに反映させることができる(=最新状態までバージョンアップ) -バージョン情報を指定してrakeタスクを実行し、バージョンを任意のバージョンにバージョンアップ、バージョンダウンさせることもできる ---- // アクセス解析 #include_js(http://www.research-artisan.com/userjs/?h=2&user_id=20091024006000857)
*&this_page() **RubyGems Rubyのパッケージ管理システム。 >gem search #openclose(show=実行結果){  *** LOCAL GEMS *** actionmailer (2.3.4) actionpack (2.3.4) activerecord (2.3.4) activeresource (2.3.4) activesupport (2.3.4) fxri (0.3.6) fxruby (1.6.16) hpricot (0.6.164) log4r (1.0.5) ptools (1.1.6) rack (1.0.1) rails (2.3.4) rake (0.8.7, 0.8.1) ruby-opengl (0.60.0) sqlite3-ruby (1.2.5) test-unit (2.0.1) win32-api (1.2.1, 1.2.0) win32-clipboard (0.4.4) win32-dir (0.3.2) win32-eventlog (0.5.0) win32-file (0.5.5) win32-file-stat (1.3.1) win32-process (0.5.9) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.2.4) windows-pr (0.9.3) } ***gem ヘルプ >gem -h #openclose(show=実行結果){ RubyGems is a sophisticated package manager for Ruby. This is a basic help message containing pointers to more information.  Usage:   gem -h/--help   gem -v/--version   gem command [arguments...] [options...]  Examples:   gem install rake   gem list --local   gem build package.gemspec   gem help install  Further help:   gem help commands      list all 'gem' commands   gem help examples      show some examples of usage   gem help platforms      show information about platforms   gem help <COMMAND>      show help on COMMAND                   (e.g. 'gem help install')  Further information:   http://rubygems.rubyforge.org } ***gem コマンド一覧 >gem help commands #openclose(show=実行結果){ GEM commands are:   build       Build a gem from a gemspec   cert       Manage RubyGems certificates and signing settings   check       Check installed gems   cleanup      Clean up old versions of installed gems in the local            repository   contents     Display the contents of the installed gems   dependency    Show the dependencies of an installed gem   environment    Display information about the RubyGems environment   fetch       Download a gem and place it in the current directory   generate_index  Generates the index files for a gem server directory   help       Provide help on the 'gem' command   install      Install a gem into the local repository   list       Display gems whose name starts with STRING   lock       Generate a lockdown list of gems   mirror      Mirror a gem repository   outdated     Display all gems that need updates   pristine     Restores installed gems to pristine condition from files            located in the gem cache   query       Query gem information in local or remote repositories   rdoc       Generates RDoc for pre-installed gems   search      Display all gems whose name contains STRING   server      Documentation and gem repository HTTP server   sources      Manage the sources and cache file RubyGems uses to search            for gems   specification   Display gem specification (in yaml)   stale       List gems along with access times   uninstall     Uninstall gems from the local repository   unpack      Unpack an installed gem to the current directory   update      Update the named gems (or all installed gems) in the local            repository   which       Find the location of a library file you can require For help on a particular command, use 'gem help COMMAND'. Commands may be abbreviated, so long as they are unambiguous. e.g. 'gem i rake' is short for 'gem install rake'. } **scaffold 「scaffold」(スキャフォゥド:「足場」という意味) scaffoldを使うと、一連の操作を行うための画面やその裏側の処理を行うプログラムを自動生成できます。 -一覧表示(ページング機能付き) -単票形式のデータ表示 -新規登録 -編集 -削除 ***scaffoldの利用方法 >ruby script/generate scaffold -h #openclose(show=実行結果){ Usage: script/generate scaffold ModelName [field:type, field:type] Options:     --skip-timestamps      Don't add timestamps to the migration file for this model     --skip-migration       Don't generate a migration file for this model     --force-plural        Forces the generation of a plural ModelName Rails Info:   -v, --version          Show the Rails version number and quit.   -h, --help            Show this help message and quit. General Options:   -p, --pretend          Run but do not make any changes.   -f, --force           Overwrite files that already exist.   -s, --skip            Skip files that already exist.   -q, --quiet           Suppress normal output.   -t, --backtrace         Debugging: show backtrace on errors.   -c, --svn            Modify files with subversion. (Note: svn must be in path)   -g, --git            Modify files with git. (Note: git must be in path) Description:   Scaffolds an entire resource, from model and migration to controller and   views, along with a full test suite. The resource is ready to use as a   starting point for your RESTful, resource-oriented application.   Pass the name of the model (in singular form), either CamelCased or   under_scored, as the first argument, and an optional list of attribute   pairs.   Attribute pairs are column_name:sql_type arguments specifying the   model's attributes. Timestamps are added by default, so you don't have to   specify them by hand as 'created_at:datetime updated_at:datetime'.   You don't have to think up every attribute up front, but it helps to   sketch out a few so you can start working with the resource immediately.   For example, 'scaffold post title:string body:text published:boolean'   gives you a model with those three attributes, a controller that handles   the create/show/update/destroy, forms to create and edit your posts, and   an index that lists them all, as well as a map.resources :posts   declaration in config/routes.rb.   If you want to remove all the generated files, run   'script/destroy scaffold ModelName'. Examples:   `./script/generate scaffold post`   `./script/generate scaffold post title:string body:text published:boolean`   `./script/generate scaffold purchase order_id:integer amount:decimal` } **rake Rubyのビルドツール(AntやMake等) ***rake オプション一覧 >rake -h #openclose(show=実行結果){ rake [-f rakefile] {options} targets...   Options are ...   -C, --classic-namespace     Put Task and FileTask in the top level namespace   -D, --describe [PATTERN]     Describe the tasks (matching optional PATTERN), then exit.   -n, --dry-run          Do a dry run without executing actions.   -e, --execute CODE        Execute some Ruby code and exit.   -p, --execute-print CODE     Execute some Ruby code, print the result, then exit.   -E, --execute-continue CODE   Execute some Ruby code, then continue withnormal task processing.   -I, --libdir LIBDIR       Include LIBDIR in the search path for required modules.   -P, --prereqs          Display the tasks and dependencies, then exit.   -q, --quiet           Do not log messages to standard output.   -f, --rakefile [FILE]      Use FILE as the rakefile.   -R, --rakelibdir RAKELIBDIR   Auto-import any .rake files in RAKELIBDIR.(default is 'rakelib')     --rakelib   -r, --require MODULE       Require MODULE before executing rakefile.     --rules           Trace the rules resolution.   -N, --no-search, --nosearch   Do not search parent directories for the Rakefile.   -s, --silent           Like --quiet, but also suppresses the 'in directory' announcement.   -g, --system           Using system wide (global) rakefiles (usually '~/.rake/*.rake').   -G, --no-system, --nosystem   Use standard project Rakefile search paths, ignore system wide rakefiles.   -T, --tasks [PATTERN]      Display the tasks (matching optional PATTERN) with descriptions, then exit.   -t, --trace           Turn on invoke/execute tracing, enable full backtrace.   -v, --verbose          Log message to standard output.   -V, --version          Display the program version.   -h, -H, --help          Display this help message. } ***rake タスク一覧 >rake -T タスク一覧が見られます(注意:-T 小文字じゃだめ) 参考:[[Ruby on Railsでrakeコマンドを使って様々なタスクを実行しよう>http://doruby.kbmj.com/t_article/20090317/_rake_1]] **マイグレーション DBのバージョン管理システム。 具体的には次のような仕組みです。 -db/migrateディレクトリ配下にdb/migrate/20080728204433_create_categories.rbのように、DBに対する変更内容が記述されたファイルを配置 -このとき、各ファイル名の先頭には「20080728204433」の部分のように、タイムスタンプに基づくバージョン情報が付く -マイグレーションは現在のDBのバージョン情報を保持する。これにより、db/migration内のファイルのうち、どれがDBに反映されて、どれが反映されていないかが分かる -「db:migrate」というrakeタスク(「make install」のようなバッチ処理をイメージすると分かりやすい)を実行して、未反映の変更をDBに反映させることができる(=最新状態までバージョンアップ) -バージョン情報を指定してrakeタスクを実行し、バージョンを任意のバージョンにバージョンアップ、バージョンダウンさせることもできる ---- // アクセス解析 #include_js(http://www.research-artisan.com/userjs/?h=2&user_id=20091024006000857)

表示オプション

横に並べて表示:
変化行の前後のみ表示:
目安箱バナー