Ruby on Rails チュートリアル プロダクト開発の0→1を学ぼう Railsチュートリアルとは?
翔泳社では5月19日に子どもたちがプログラミングの考え方を楽しみながら学べる『ルビィのぼうけん』を刊行しました。プログラミングはただ仕事をこなすためだけの道具ではなく、この世界の物事を理解し、課題を見つけて解決する考え方にも繋がります。ぜひ本書で、プログラミング教育に触れてみてください。 『ルビィのぼうけん こんにちは! プログラミング』は、フィンランドのプログラマーであり作家のリンダ・リウカスさんがKickstarterで資金を集め制作した、子どもたちがプログラミングの考え方=「プログラマー的思考法」を学ぶための絵本です。特定のプログラミング言語やコードの文法などは出てこず、問題の見つけ方や取り組み方、解決方法などプログラミングの根底に流れる基礎の考え方を紹介しています。 プログラミングは、少なくともその初歩は21世紀の教養となりつつあります。学校教育でもプログラミングを取り入れられ、我
Photo by HeatSync Labs こんにちは。谷口です。 プログラミングをこれから学ぼうとしている方で、「人気のRubyを勉強してみたい!」という方は多いと思います。 Rubyは『オープンソースの動的なプログラミング言語で、 シンプルさと高い生産性を備えています。 エレガントな文法を持ち、自然に読み書きができます』とされています(オブジェクト指向スクリプト言語 Ruby)が、やはり「プログラミング経験ゼロからいきなり勉強を始めるには敷居が高いな……」と思っている方も多くいらっしゃるのではないでしょうか。また「できれば独学じゃなくてスクールに通いたいけど、コストは押さえたいんだよな……」という方もいらっしゃるかと思います。 そこで今回は、プログラミング未経験~初心者の方が、なるべくコストをかけずに楽しくRubyに触れられて、学習に役立てられるコンテンツを10件ご紹介していきます。
2013年12月25日。おめでとうございます、Ruby 2.1.0がリリースされました! 日本時間で26日という細かい突っ込みをしている場合ではありません。 まだ使ったことがない方、簡単に変更点を見てみましょう。 文法の変更 デフォルト値を伴わないキーワード引数 Ruby 2.0が出たときから誰もが思っていた疑問、「なんでキーワード引数はデフォルト値必須なんだ?」がついに解消されました。以下の記法で、デフォルト値をつけないキーワード引数を宣言できます。この場合、呼び出し時に対応する実引数を渡さないとArgumentErrorになります。 def hello(name: ) puts name end hello(name: "taro") # => taro hello # => ArgumentError: missing keyword: name キーワード引数同士ではデフォルト引数
IBM、新開発のPaaS「BlueMix」をベータ公開。Java、Node.js、Ruby実行環境とMySQL、MongoDB、MapReduce、モバイルBaaSにGitホスティング、Web開発環境など盛りだくさんの対応。IBM Pulse 2014 米IBMのイベント「IBM Pulse 2014」が2月24日(現地時間)にラスベガスで開幕しました。SoftLayerを買収以来はじめて、同社のクラウド戦略を大きくアピールするイベントとなります。 初日のジェネラルセッションでIBMソフトウェアグループ シニアバイスプレジデントRobert LeBlanc氏は、これまで同社がクローズドベータとして開発してきたPaaS型クラウドサービス「BlueMix」(コード名)のベータ公開を明らかにしました。 コンポーネントを選択し、組み合わせていくBlueMix BlueMixはSoftLayerをク
Ruby 2.1.0 に Socket.getifaddrs が登場 ネットワーク畑の人間からすれば、 Ruby 2.1.0 の目玉機能は間違いなく Socket.getifaddrs だ。これがあれば、「インターフェイス名からそのインターフェイスの持っているIPアドレスを確認する」ことが簡単にできるようになる。 これまで これまでは、 ifconfig や ip コマンドの結果から頑張って取ってこなくてはならなかった。 res = `ifconfig eth0` res =~ /inet addr:(\d+\.\d+\.\d+\.\d+)/ addr = $1 できるけど気持ち悪いし、v6アドレスになると死ぬし、外部コマンド実行をするとエラー対応とかセキュリティとかが厄介な問題になる。 これから Ruby 2.1.0 からは、 Socket.getifaddrs メソッドが追加されている
2024年4月1日より、Supership株式会社は親会社であるSupershipホールディングス株式会社に吸収合併されました。 合併に伴い、存続会社であるSupershipホールディングスは社名をSupershipに変更し、新たな経営体制を発足しました。本件に関する詳細は、プレスリリースをご確認ください。 2024年4月1日より、Supership株式会社は親会社であるSupershipホールディングス株式会社に吸収合併されました。 合併に伴い、存続会社であるSupershipホールディングスは社名をSupershipに変更し、新たな経営体制を発足しました。 本件に関する詳細は、プレスリリースをご確認ください。
FINDJOB! 終了のお知らせ 2023年9月29日にFINDJOB!を終了いたしました。 これまでFINDJOB!をご利用いただいた企業様、求職者様、様々なご関係者様。 大変長らくFINDJOB!をご愛顧いただき、誠にありがとうございました。 IT/Web系の仕事や求人がまだ広く普及していない頃にFind Job!をリリースしてから 約26年間、多くの方々に支えていただき、運営を続けてまいりました。 転職成功のお声、採用成功のお声など、嬉しい言葉もたくさんいただきました。 またFINDJOB!経由で入社された方が人事担当になり、 FINDJOB!を通じて、新たな人材に出会うことができたなど、 たくさんのご縁をつくることができたのではないかと思っております。 2023年9月29日をもって、FINDJOB!はその歴史の幕を下ろすこととなりましたが、 今後も、IT/Web業界やクリエイティブ
Ruby on RailsならサクサクとWebアプリを開発することができます。ですので、ついつい幾つものアプリを開発しちゃいますよね。当然ですよね(!?) となると面倒くさいのがgemの管理。1台のPCで開発しているので、各アプリで使用するgemのバージョン管理ややこしい。このアプリはRails3だけど、あっちのアプリはまだRials2系で、そっちのアプリはSinatraとnokogiri・・・なんて感じで、めちゃくちゃ面倒くさい。。。 そこで登場するのがbundlerです。これは各Rubyアプリケーション毎にgemファイルを独立して管理することができるツールです。各環境を汚すことがないので、従来のrubygemsよりも安全な開発環境を簡単に構築することができます。これは使うっきゃない!ちなみに、Rails3からは標準となっていますが、bundlerはRails以外でも使用できます。 とい
Rails ではアプリケーションで必要となる Gem パッケージの管理に Bundler を使用します。 Bundler の設定ファイルである Gemfile 、インストールを行った結果を保存する Gemfile.lock を使うことで複数の環境で別れて同じアプリケーションを開発する場合でも、簡単に同じ開発環境を整えることができます。ここでは Bundler を使って複数の環境で同じバージョンの Gem を使用する方法について解説します。 Gemパッケージとは まずは Gem パッケージについて簡単に解説します。 Ruby で使われるライブラリやアプリケーションは、 Gem と呼ばれる形式のパッケージにすることができます。多くのライブラリが Gem 形式でパッケージされ公開されており、これらは RubyGems と呼ばれるパッケージ管理ツールを使ってダウンロードしたりインストールすることが
Web IDEを統合したPaaS「Nirous.io」がオープンβ開始。Ruby、Python、Node.js、Go対応で、友達を紹介すると無料枠の性能が向上 また新しいPaaS型クラウドサービスが登場しました。オープンβを開始したばかりの「Nitrous.io」(動画を見る限り「ナイトラス・アイオー」と発音するらしい)はRuby、Python、Node.jsとGoに対応したPaaS型クラウドサービスで、Webブラウザから利用できる統合開発環境を統合。サーバのプロビジョニングからアプリケーション開発、デプロイまですべてがWebブラウザで完結します。 Nitrous.ioではアプリケーションは「Box」上で実行し、Boxの性能は「N2O」と呼ばれる単位で管理されます。新規のBoxにはユーザー当たりデフォルトで、合計で150N2Oに相当する384MBメモリ、750MBストレージが無料で提供され
音楽の話題ではないよ。 railsで、DBのレコードロックについてちょっと調べた。 ruby on railsが提供するレコードロックは楽観的ロックと悲観的ロックの2種類がある。 この、いかにも直訳調な名称もどうかと思うけど、たいがい二つ並べて解説されているのでなんかこうよく似たものと思われがち。ところがこの二つ、実は使いどころがまったく違うシロモノだったって話。 悲観的ロックは、レコードを読み込むときかける形式のロックで、要するに「これからこのレコードをいろいろいじるのでほかのやつらは触るなよ」と言う宣言。実装はDBエンジンに依存している。MySQLなりPostegrasなり、主要なDBエンジンはたいてい対応しているはず。 楽観的ロックは、レコードを書き込むときに問い合わせる形式のロックで、要するに「とりあえず変更したレコードを手元に持っているけどほんとにこれ書き込んでいいのかな」という
(追記:2012-12-03) 本記事を電子書籍化しました。「Gumroad」を通して100円にて販売しています。詳細は文末に追記しましたので、購入ご検討のほどよろしくお願いしますm(__)m 電子書籍「これからRubyを始める人たちへ」EPUB版 Rubyの特徴 Rubyは、まつもとゆきひろ氏(通称Matz)により設計されたオブジェクト指向プログラミング言語です。Rubyの特徴を一言で言うならば、それは「間口が広くて奥が深い言語」ということになります。 「間口が広い」というのは、インタフェースがシンプルで誰でもが簡単に使い始められることを意味します。「奥が深い」というのは、プロフェッショナルによる長期使用に耐えうる本物の言語であるということを意味します。「間口が広い」ということと「奥が深い」ということは本来競合する概念ではありませんが、その両方をバランスよく組み合わせるには、対象に対する
はじめましてこんにちは。 KRAYアルバイトの浅海です。 html5のcanvasを使ってお絵かき投稿サイトを作ってみようと思います。 初めてブログ記事を書くということで気合が入りました。 ちょっと長めですがお付き合い下さい。 機能 お絵かき投稿サイトの必要最低限な機能って? ざっと下のような機能を入れてみます。 絵を描ける 絵を消せる 描画を一回分戻れる 線の太さを変えられる 線の色を変える 絵を投稿できる 投稿された画像の一覧を表示できる → 完成見本はこちら完成見本の公開は終了致しました。 絵を描ける HTML5のcanvasにマウスの軌道に線を引いていくわけです。 canvasでのマウス軌道の描き方は、 ・mousemoveイベント発生時に点をプロット という手段が真っ先に思い浮かぶと思いますが、これは、以下の様になります。 これではお話になりません。 なので、点ではなく線を引くこ
Document Data Structure in MongoDB Express MongoDB lets you easily store structured and unstructured data in a flexible and dynamic database schema. It supports CRUD operations on complex data objects using JSON as the main data type. Its an open source solution so it may not be as robust or well supported as commercial management tools. However it is easy to deploy and works well for most use cas
以前書いた » つくるぶガイドブログ: ひとりサービスをリリースするまでやっておくこと10個 や つくるぶガイドブログ: ひとりサービスをリリースするまでやっておくこと10個 : 僕は発展途上技術者 を読んでいて、更新したくなった。 以下は更新部分しか重点的に書かないので、詳細知りたければ上記エントリーとあわせて読んでほしい。 アプリケーションエラーをメールで通知する。以前は Exception Notifier プラグインを使っていたが、今は Hoptoad が断然おススメ。 エラーページをカスタマイズする Javascript を無効にしているユーザー向け対策をおこなう フッターのコピーライト表示を常に最新にしておく slow query ログを送るようにしておく DBのバックアップを定期的におこなう仕組みを作っておく サイトのアクセス解析をおこなう。PCならGoogle Analyt
フルスタックがウリの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ページを開く