サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
レイングッズ
wiki.rubyonrails.org
gemはRubyアプリケーション、またはライブラリのパッケージで、名前(例えばrails)とバージョン(例えば2.3.0)を持っています。 gemはコンピュータ上でRubyGemsライブラリに含まれるgemコマンドを用いて管理されます。同様にgemコマンドを使ってgemパッケージをインストールしたり、削除したり、(たくさんの中から)検索したりできます。 RubyGemsはRubyの主流のパッケージングシステムで、次のようなものを提供します:
The following databases may be used with Rails but are not supported by ActiveRecord.
The restful-authentication plugin is among the most common ways to easily get user authentication in your Rails application. It includes the following features:
These instructions will walk you through the process to get Thin up and running with Nginx as the HTTP server. For a long time the recommended stack for Rails was based around Mongrel and Nginx - it's worth noting there are a variety of deployment methods (covered elsewhere in this Wiki). Thin uses a combination of libraries from Mongrel, Event Machine and Rack. This combination is (apparently) fa
Steps to ensure Haml works: 1. In config/application.rb, be sure to add Haml as a template_engine. config.generators do |g| g.template_engine :haml end 2. Run haml –rails . to initialize Haml under Rails. 3. Rails 3 generators for Haml are at: http://github.com/pjb3/rails3-generators. Passenger 2.2.9 is fully compatible with Rails 3. Though if you wish to take advantage of REE's optimizations you
PostgreSQLはパワフルなオープンソースのオブジェクト・リレーショナルデータベースシステムです。 15年以上にわたってアクティブな開発が続けられ、信頼性やデータの完全性、正確さを高く評価された実績あるアーキテクチャを備えています。 1) 現在、ActiveRecord / RailsのPostgreSQLデータベースアダプタとしては、唯一、デフォルトのもののみが存在しており、database.ymlファイル内では”postgresql“という名前で参照されています。このアダプタはpg、postgresおよびpostgres-prのgemをサポートしています。 4種類のPostgreSQLクライアントライブラリがgemとして利用可能です: postgres gemはC言語で書かれており、ActiveRecordによってサポートされています。最新のリリースは0.7.9 (2008-01-
unixODBC >= 2.2.11 (http://www.unixodbc.org/) unixodbc-dev FreeTDS >= 0.63 (http://www.freetds.org/) freetds-dev Note that you need to install unixODBC before FreeTDS: The ./configure step of FreeTDS is dependent on unixODBC being installed: ./configure —with-unixodbc=/usr/local Ruby ODBC binding (http://www.ch-werner.de/rubyodbc/ruby-odbc-0.9997.tar.gz). Extract and in the extracted folder run:
ApacheのCouchDBはRESTful HTTPやJSON API経由でアクセス可能な、耐障害性に優れたスキーマレスなドキュメント志向の分散データベースです。 CouchDBはJavascriptを問い合わせ言語として使用してRESTfulなJSON API経由でアクセスできるドキュメントベースのデータベースサーバーです。CouchDBはRailsの基本的な規約の一つ、ORMデータ構造、の背景である関係データベースでもなければオブジェクト指向データベースでもありません。CouchDBはActiveRecordやその他の関連データ構造レイヤを置き換えることを目指しているのではなく、オブジェクト指向プログラミング言語のためのシームレスな永続化層として機能することを目指しています。 A CouchDB document is an object that consists of named
対応したプラットフォームのRuby/Railsをインストールし、SQLiteがインストールされていることを確認します(Macをお持ちの場合は付属しています)。インストールに関するwikiページはこちらです: Mac、 Windows、 Linux。
Webrat – A Ruby browser simulator for integration/acceptance testing
attributes – if you have a has_many called attributes, you can’t access to your object attributes anymore; only the associated objects @base_path – setting this variable name in a controller method seems to break the ablity to render a partial in the view. The view will render with no content and no errors will be generated .
JasperReports is a powerful—and even more important—well known open source Java reporting tool that has the ability to deliver rich content in formats such as PDF, RTF, HTML, CSV and XML. It is widely used and appreciated in the Java community because of its flexibility and the availability of various GUI tools for rapid report design. The following paragraphs explain how to interface Rails and Ja
In this tutorial you will install Ruby, RubyGems, and Rails on Debian/Ubuntu. Prerequisite packages: $ sudo apt-get install build-essential libssl-dev libreadline5-dev zlib1g-dev Download ruby sources: $ wget ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz then $ tar xzf stable-snapshot.tar.gz Compiling and installing $ cd ruby/ $ ./configure $ make $ sudo make install Test installation $
Log files Your rails application will quickly accumulate large log files once in production. Ruby’s Logger class can be configured to roll them over for you, but this will cause errors if you have more than one Rails process (as most production sites do). See Agile Development with Rails (p.467 or p.628 in 2nd ed.). The better solution is to write an external script to handle the rotation. For exa
From the Rails list: First, some quick definitions: functional testing—Trying to break a web application by shoving crap into the forms and clicking buttons the developers don’t click. load testing—Trying to break a web application by pounding the hell out of it with tons of simultaneous connections. performance testing—Trying to analyze the performance of a web application so that you can compare
Overview IIS7 on Windows Server 2008 includes built-in support for FastCGI. This document will explain how to: Configure Rails to run directly under IIS, without proxying to another webserver Configure multiple Rails applications to run in different virtual directories under one site Configure Rails for use in a shared hosting environment, where end users do not have administrative access to the s
These instructions pertain to connecting from a Windows computer. If you need to connect from a non-Windows computer, follow these instructions: HowtoConnectToMicrosoftSQLServerFromRailsOnLinux. For OSX using iODBC see HowtoConnectToMicrosoftSQLServerFromRailsOnOSX. For FreeBSD see HowtoConnectToMicrosoftSQLServerFromRailsOnFreeBSD. —— New SQLServer 2008 Issues: SQLServer2008Issues Starting wit
Action Mailer can be configured to receive incoming email and interact with the domain model of the application on the basis of the content. A few examples of what that could be used for: Posting to your weblog (possibly from your mobile phone) Uploading pictures that are then thumb-nailed with RMagick Recording a bug in your tracker when the application crashes Let’s consider the following Action
This assumes that you have already created a subversion repository, and you are just wondering how to setup your rails project. If you have WEBrick or lighttpd running after running “script/server” in your rails directory, shutdown the server. Import your rails application. navigate to the root of your rails app. svn import . repository_url -m "Import" --username user Change to the directory conta
This howto shows how to modify some of the defaults in rails’ logging configuration. For background about what the logger is and how to use it, see logger. Basics You can control some aspects of the logger through the config object in config/environment.rb for a change in all environments Log Level The available log levels are: :debug, :info, :warn, :error, :fatal. The ruby Logger class normally a
The CSV text-file format is a common choice for both import and export when performing data migrations. The Ruby FasterCSV library (gem install fastercsv) does a great job working with this format. What if you want to generate CSV files for download within a Rails application? FasterCSV provides a way to stream output to a file as you feed individual data rows to the csv object using <<. You could
You can easily export an XML file into Excel. There’s an introductory tutorial at the MSDN Blog: Office XML Formats and more complete information is available in the Office 2003 XML Reference Schemas (you’ll need a CHM viewer for your platform and a way to extract an MSI to make use of it though). Here’s a quick example: In your controller (replace “Record” with your model): def export headers['C
This article discusses how to setup lighttpd with the scripts in script/process as introduced in the 0.14.1 release (aka 1.0RC1). I publish this in the hope that it is useful to you but won’t take any guarantees or blames for you screwing up your server. Introduction Welcome to the wonderful world of deploying Ruby on Rails with lighttpd in the 1.0 series. From 1.0 RC1, Rails applications have a s
This Rails plugin is an extension of ActsAsNestedSet that adds some enhancements in response to confusion about the use of ActsAsNestedSet. You might use this plugin to model a threaded discussion board. The underlying implementation uses Modified Preorder Tree Traversal for efficiency and scalability. Homepage API docs Table Schema create table tree_item ( id int(11) unsigned not null auto_incre
Installation Using the plugin script: script/plugin install enum-column To manually install using Subversion, do the following. In your vendor/plugins directory, type the following: svn checkout svn://rubyforge.org/var/svn/enum-column Otherwise visit: http://rubyforge.org/projects/enum-column/ How to use it. In your schema When you create your schema, specify the constraint as a limit: create_t
Sample code is worth its weight in gold, so here’s how to get a basic Rails application running. First, check GettingStartedWithRails or http://api.rubyonrails.org/ for installation and basic setup instructions. Super-quick “hello world” app This was written by ReinH as the quickest possible way to get from install to “hello world”. alias rails_hello_world='rails hello && cd hello && ./script/gene
MySql 5.0 introduced stored procedures and functions, but I wasn’t able to get them to work right away using Rails 1.1. This is what I did to get them to work using Ruby 1.8.4 and MySql 5.0.20 on Windows 2000: Caution: This involves modifying some (very easy) code in the Rails MySql Adapter file. If you update rails you will likely have to re-do these changes. 1. Verify you have MySql 5.0+: Make s
次のページ
このページを最初にブックマークしてみませんか?
『Ruby on Rails Wiki => Rails Wiki』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く