You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
(訳注: 2016/3/2、頂いたフィードバックをもとに記事を修正いたしました。) Ruby on Railsは最近、急激に注目を集めていますが、その原因はほとんど、この言語が斬新なテクノロジーとしてもてはやされたことと、タイミングにあります。技術的な優位性は時間の経過とともに失われますから、タイミングがよかっただけでは、一過性のブームに終わり、このムーブメントの隆盛は長続きしません。従って、「Railsがいかにして、適切な技術としての位置を維持し続けるるだけでなく、影響力とコミュニティを拡大し続けてきたのか」をより多くの人に説明していく必要があります。そして、その維持・拡大を可能にした/していく要因は、物議を醸すことさえあるRailsの基本原則にあると考えています。 この基本原則はここ10年ほどの間に進化を続けてきましたが、最も強固な柱となっているルールはやはり、公開当初から制定されてい
See related links to what you are looking for.
最近、RubyやRails系の入門チュートリアルを中心にいくつかの記事があったので、知っている入門系チュートリアルを一式をまとめてみました。本当の初心者な方から、本格的にRubyを勉強したいと思う人にすっごいオススメです! (2016/02/20 17:30) 全般的に内容をリファクタリング 😎 スライド 拙著ですが、Railsをスタートダッシュして学ぶときに良さそうな記事や資料をまとめました。 Ruby 概論のスライド Spice Life CTOの五十嵐邦明さんの一橋大学での講義「Ruby概論」のスライド。 🎳 動画 Ruby入門 (全22回) Ruby on Rails 4入門 (全28回) 最初に見てほしいのがRuby/Railsのドットインストール。このあたりから少しずつ始めていくといいと思います! 🐞 ハンズオンProgate | プログラミングの入門なら基礎から学べるP
皆さん、Railsの開発でデバッガ使ってますか? 私は最近ようやく使うようになりました。 それまでは、Rubyistなら誰もがやっているであろう、ppデバッグ(ppで変数を表示)のみでデバッグを行なっていました。 C#でプログラムを開発していた頃は、 「デバッガ無しで開発とかありえない!大きなプロジェクトでppデバッグとか、そんな手法使えるわけないだろ」 と思っていましたが、Rubyだとデバッガ無しでも案外なんとかなってしまいます。 ppを埋め込んで変数を表示、などもお手軽にできるのが、軽量言語の素晴らしい所でもあると思います。 しかし、流石にプロジェクトの規模が大きくなるに連れて、ppデバッグだけではプログラムの流れを追いにくい、という問題に直面していました。 エラーがどこで発生したのかを確認するために、ppを至る所に埋め込んでデバッグ。そんな手法に限界を感じていた、ある日、同じプロジェ
Webアプリのリハビリ ということで、Official Blog: A second spring of cleaningで告知された、Google Reader閉鎖に備え、俺専用RSSリーダーをRuby on Railsで軽めに作ってみた。 read.aho.mu 目的としてはRuby + Railsの学習と、サーバーサイドのリハビリのつもりだったのだけど、簡単すぎて実作業1日分くらいで終わってしまった..(´・ω・`) 自分で登録したフィードを、自分でなんとなく流し読みして、良いと思った記事に♡を付けられるだけなのですが、それがついでにオープンになっているだけ。 色々もにょもにょ 触ってみた箇所について所感など。 前からScalaなりNodeなりでHello Worldまでは試してましたが、素直にRailsをデプロイして動くところまで手を入れたのは初。 無料で使えるアドオンを幾つか入れ
Rails Girls アプリ・チュートリアル Created by Vesa Vänskä, @vesan まず、Railsがインストールされていることを確認してください。 ** もしくはこちらのリンクを見てインストールしてください。** Step 0: ツールを知る テキストエディタ: Sublime Text, Komodo Edit, Vim や Emacs, Gedit は、テキストエディタの例です。コードを書いたりファイルを編集したりすることができます。 ターミナル (Terminal; Windowsではコマンドプロンプトと言う): rails serverを起動したりコマンドを実行したりするものです。 ウェブブラウザ (Firefox, Safari, Chrome): アプリケーションを表示するためのものです。 Step 1: アプリケーションを作る railsgirls
簡単な注文システムを想定してセッションを進めます。 以下を実行して、アプリの開発に必要となるファイルを生成します。 (rails -h と実行すると、利用可能な rails サブコマンドとサブコマンドの説明が表示されます) rails new chumon 必要なファイルが chumon ディレクトリの中に生成されます。 以降は chumon ディレクトリの中で作業を行います。 cd chumon 以下は Rails3.2 で最初にやらなければならないお決まりの設定です。 Gemfile を編集します。 gem 'therubyracer', :platform => :ruby Gemfile を編集した後は必ず bundle install コマンドを実行します。 bundle install Rails アプリのディレクトリ構造です。 . # |-- Gemfile # アプリで利用
2009年12月29日08:34 Ruby RSpecでGrowlなテスト環境♪ mac で Growl な環境で、テスト環境を構築してみます。利用するライブラリは以前も紹介しましたが、rspec + rspec-rails + autotest(ZenTest) です。で、.autotest をこのように設定しました。これでテストの度にその結果を Growl で通知してくれるようになります。 require 'autotest/redgreen' #require 'autotest/growl' IMG_OK = '~/.autotest_icons/rails_ok.png' # 成功時の画像 IMG_NG = '~/.autotest_icons/rails_fail.png' # 失敗時の画像 IMG_PD = '~/.autotest_icons/syatyou.jpg' #
色々なところで見かけるコーディング規約を見て意識はしているのですが、 その時の気分で書き方を変えてしまうことが多々あったので、自戒を込めてコーディング規約をまとめてみました。 「なぜこの規約が存在するか」を明確にするために、できる限り理由も併記しています。 ただかなり主観的な部分があるので、あまり意味がないかもしれません…。 「この記事のこの規約は気に入らない。」と思うことがきっとあると思います。 その時はコメント欄などに理由も合わせて書いてくれると嬉しいです。 この記事ではRubyのコーディング規約をまとめています。 近いうちにRailsとCoffeeScriptのコーディング規約もまとめるつもりです。 Rubyのコーディング規約は以下のページを参考にまとめました。 https://github.com/styleguide/ruby https://github.com/bbatsov
2012年04月19日 最近、新人のテストコードを見る機会があり、ユニットテストの書き方について考える機会があった。ユニットテストはテンプレートみたいなものがあるので、それさえ押さえれば、誰でも簡単に書くことができる。 ここでは、その方法について紹介したい。サンプルはRSpecで書くが、その他のユニットテストフレームワークでも、応用ができるとおもう。 はじめにごく単純化すると、テスト対象は状態を持ち、入力を与えると何らかの出力を行なうものである。入力が変われば出力は変化するし、状態が変化すると入力が同じでも出力が変わる(かもしれない)。 ユニットテストは、テスト対象の状態を操作し、与えた入力によって意図通りの出力を得られるかを確認する作業のことをいう。なので、ユニットテストを書くときには、オブジェクトの状態ごとにメソッド単位で入力と出力を確認するようにする。 RSpecの疑似コードで書くと
トップ 目次 はじめに コマンド Rubyの起動 環境変数 Ruby 言語仕様 Ruby でのオブジェクト オブジェクト クラス プロセスの実行 Ruby プログラムの実行 終了処理 スレッド セキュリティモデル Ruby の文法 字句構造 プログラム・文・式 変数と定数 リテラル 演算子式 制御構造 メソッド呼び出し(super・ブロック付き・yield) クラス/メソッドの定義 その他 多言語化 正規表現 手続きオブジェクトの挙動の詳細 組み込みライブラリ Builtin libraries 標準添付ライブラリ All libraries C API All C API その他 pack テンプレート文字列 sprintf フォーマット Ruby用語集 Rubyで使われる記号の意味(正規表現の複雑な記号は除く) 疑似BNFによるRubyの文法 配布条件 このマニュアルのヘルプ
Ruby のサンプルプログラムを見つけましょう。 サンプルプログラムは自由に使用することができます。(詳しくは こちら) 例: Array#delete Hash Masaru(”まさる”さん)は、 Ruby のリファレンスマニュアルを読んだユーザが、 「もう少しサンプルが多ければいいのに」とか、 「このメソッドでこんなこともできるのに」と思ったときに、 ユーザ自身でサンプルプログラムを登録できるようにするために開発したシステムを利用した、 Ruby のサンプルプログラムを登録や閲覧をするためのサイトです。 String#* / yasuda-h at netlab dot jp 同じ文字列を複数並べて表示する。 47pt | 2008-08-23 02:27:19 String#% / yasuda-h at netlab dot jp 数値で文字列数を指定し、出力される内容の整形を
「Do Ruby!」とは、株式会社ケイビーエムジェイのエンジニアによるRuby on Rails技術解説ブログです。Ruby on Rails開発現場ならではの実践的な技術ブログを随時掲載していきます。是非ご覧下さい。KBMJ(ケイビーエムジェイ)では、Ruby on Railsによるシステム構築・開発を承っております。KBMJがZDnetで連載している記事を紹介します。コメントなどありましたらそちらでお願いします。 Rubyでどう書く?:RubyCocoa+Core Animationでお手軽アニメーション 佐藤伸吾(KBMJ) 今回はRubyCocoaとMac OS XのフレームワークであるCore Animationを使って、お手軽にアニメーションを作成してみましょう。
フルスタックがウリのRails。そこまで必要ないよ。と、ERBでゴリゴリ。メンドクセー。やっぱ、Railsで。などと、陽はまたのぼりくりかえしてーゆく。RubyのWebフレームワークは他にもあるけど。。軽くていいんだ。PHPを使いたくないだけなんだ。 そんな悩ましさを解消してくれるフレームワークを発見してしまいました。「Sinatra」でございます。こいつは、軽そうだ。 Sinatra サイトのトップページに書かれているコード。これが、サクサク感をかもし出してくれています。 require 'rubygems' require 'sinatra' get '/hi' do "Hello World!" end 説明読まなくても解るよ、これ。 日本語の解説スライドがあります。よく解る解説ー。 公式サイトのREADMEを読めば、だいたいOK。 Sinatra: README パラメータを取得し
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く