<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4765774983415815398</id><updated>2024-08-29T04:20:09.704+09:00</updated><category term="CloudStack"/><category term="Perl"/><category term="blog"/><category term="cloud"/><category term="API"/><category term="vagrant"/><category term="IDCF"/><category term="javascript"/><category term="まとめ"/><category term="学習"/><category term="OpenFlow"/><category term="Ruby"/><category term="tool"/><category term="RightScale"/><category term="Titanium"/><category term="chef"/><category term="ネットワーク"/><category term="PaaS"/><category term="Rails"/><category term="s3"/><category term="サイト"/><category term="プレゼン"/><category term="Heroku"/><category term="Trema"/><category term="riak"/><category term="AWS"/><category term="Arduino"/><category term="nginx"/><category term="読書"/><category term="Berkshelf"/><category term="IT"/><category term="Mac"/><category term="Mail"/><category term="Scratch"/><category term="Selenium"/><category term="VirtualBox"/><category term="[思いつき]"/><category term="bash rbenv"/><category term="sticker"/><category term="test"/><category term="unicorn"/><category term="アプリ"/><category term="コンテスト"/><category term="サービス"/><category term="プログラミング"/><category term="日記"/><category term="言葉"/><category term="野球"/><category term="電話"/><title type='text'>いろいろやってみる</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nushu123.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>142</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-1560630128385671993</id><published>2015-01-11T23:55:00.001+09:00</published><updated>2015-01-11T23:56:31.141+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="まとめ"/><title type='text'>昨年の振り返りと、今年の目標</title><content type='html'>&lt;h1 id=&quot;振り返り&quot;&gt;
振り返り&lt;/h1&gt;
&lt;a href=&quot;http://nushu123.blogspot.jp/2013/01/blog-post.html&quot;&gt;2013年1月&lt;/a&gt;が最後の振り返りだったので、2年分振り返ります。&lt;br /&gt;
&lt;h2 id=&quot;できた事&quot;&gt;
できた事&lt;/h2&gt;
&lt;h3 id=&quot;2013年&quot;&gt;
2013年&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;まちクエストとの出会い &lt;br /&gt;
&lt;a href=&quot;http://machique.st/&quot;&gt;まちクエスト&lt;/a&gt;の&lt;a href=&quot;https://twitter.com/jishiha&quot;&gt;@jishiha&lt;/a&gt;に声をかけていただき、少しだけお手伝いさせていただきました。さらに、サービス開発に関する経験させていただいたり、多くの人達との出会う事ができました。 &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Vagrant + ChefSoloで開発環境構築 &lt;br /&gt;
最初の課題として、まちクエスト開発メンバー内に、同じ開発環境を利用するための環境を作成しました。数人で開発する現場に触れる事ができとても新鮮でどきどきしました。その時のブログは&lt;a href=&quot;http://blog.machique.st/post/66324268410/vagrant-chefsolo&quot;&gt;こちら&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;Rspec + Capybaraでのtest環境の構築 &lt;br /&gt;
2番目の課題として、integration testをRspec + Capybaraで書きました。javascript driverはdefaultでSeleniumを使いますが、testで使うには時間がかかりすぎるので一旦中止しました。 &lt;br /&gt;
その後、headlessのPolterguistで動作確認したので、次のtestでは、Rspec + Capybara + Polterguistを使います。&lt;/li&gt;
&lt;li&gt;Ruby on Rails &lt;br /&gt;
まちクエストではRailsを使っています。それまでPerlぐらいしか触った事なかったので、RubyおよびWeb MVC frameworkとしてのRailsを勉強する事にしました。&lt;/li&gt;
&lt;li&gt;散歩の習慣化 &lt;br /&gt;
ユーザーとして、まちクエストを楽しむようになり、自宅や通勤時の散歩の機会が増えました。まちクエストの楽しみ方として、「クエストを作成する」「クエストを発見する」の2つがありますが、私は主に前者が多いです。私のまちクエストのページは&lt;a href=&quot;http://machique.st/user/snumano&quot;&gt;こちら&lt;/a&gt;。&lt;/li&gt;
&lt;li&gt;256interns &lt;br /&gt;
@jishihaの紹介で&lt;a href=&quot;http://256interns.com/&quot;&gt;256interns&lt;/a&gt;に参加させてもらいました。256internsは、「スタートアップにインターンして、web開発に必要なプログラムとデザインの学習環境」を提供します。今まで断片的だったweb開発に必要なスキルが、つながりました。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2014年&quot;&gt;
2014年&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;webサービス作成、リリース &lt;br /&gt;
知人・友人と野球のスコアを共有できる&lt;a href=&quot;http://nushu123.blogspot.jp/2014/07/web.html&quot;&gt;BaseballScore&lt;/a&gt;をリリースしました。web開発はもちろん、いかにユーザーにつかってもらうか、サービスプロモーション・UIの試験の場としても使っています。Rails, Bootstrap,Websocket等を使用しています。&lt;/li&gt;
&lt;li&gt;AngularJS &lt;br /&gt;
会社の同僚に影響で勉強中。次のwebサービスで利用予定。&lt;/li&gt;
&lt;li&gt;一人もくもく会を開始 &lt;br /&gt;
2014年3月から、早朝の時間を使って1時間程のweb開発時間を確保。MacBookAir + iPhoneテザリングでどこでも開発できる環境ができたので、通勤電車内も利用し、早朝2時間をweb開発に確保できた。&lt;/li&gt;
&lt;li&gt;社内有志の勉強会を開始 &lt;br /&gt;
社内の技術情報の共有方法から話がすすみ、2014年春頃から、毎月1回、勉強会を開始する事になりました。最初10人から開始して、20人ぐらい参加してくれるようになりました。スピーカーの確保が課題かなと思ってましたが、予想以上にスピーカーへの応募があり、そこはうれしい誤算になってます。&lt;/li&gt;
&lt;li&gt;元旦マラソン大会の参加 &lt;br /&gt;
2015年元旦マラソンに家族で参加しました。私は4kmに参加し、なんとか完走できました。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;できなかった事&quot;&gt;
できなかった事&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;iPhoneアプリリリース &lt;br /&gt;
2014年にBaseballScoreのiPhoneアプリをリリースしたかったができませんでした。後述。&lt;/li&gt;
&lt;li&gt;ジョギング &lt;br /&gt;
2014年は継続実施ができませんでした。&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;2015年の目標&quot;&gt;
2015年の目標&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;iPhoneアプリリリース &lt;br /&gt;
BaseballScoreのUX向上のため、プッシュ通知機能を検討中。Web Viewを利用したnativeアプリにする事で、必要最小限の開発ですすめたいと思います。せっかくなので、Swiftで開発したいと思います。春までにはリリースしたい。&lt;/li&gt;
&lt;li&gt;新サービスの作成、リリース &lt;br /&gt;
画像投稿・編集系のサービスを検討中。AngularJSを使って、気持ちのよいUXを実現したい。&lt;/li&gt;
&lt;li&gt;PaaSの調査 &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Dokkuを触り始めて、deis,flynn等いろいろある事を知ったので、docker利用のPaaSを試していきたいと思います。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;一人もくもく会の継続 &lt;br /&gt;
上述のアプリ、webサービスの開発を行います。&lt;/li&gt;
&lt;li&gt;社内有志の勉強会の継続 &lt;br /&gt;
スピーカーの発掘および、参加者の増加を目指します。&lt;/li&gt;
&lt;li&gt;ジョギングの習慣化 &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;元旦マラソンで完走できたので、今年は、週末のジョギングを継続したいと思います。来年の元旦マラソンは順位も意識します。まずは、30日継続を目指します。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;コンテストの参加 &lt;br /&gt;
まだ漠然とですが、プログラミングスキルの向上を目的に、プログラミングコンテストに参加してみたいなと考えています。今は問題の意味がよく分からない状況からですが。。。&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&quot;まとめ&quot;&gt;
まとめ&lt;/h1&gt;
体力維持をすすめつつ、新しい事に挑戦していきたいと思います。そして、新たな出会いや気付きが得られたらいいなと思います。</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/1560630128385671993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/1560630128385671993'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2015/01/blog-post_11.html' title='昨年の振り返りと、今年の目標'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-3573528899767279681</id><published>2014-07-19T15:36:00.001+09:00</published><updated>2014-07-19T15:59:51.161+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Heroku"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="まとめ"/><category scheme="http://www.blogger.com/atom/ns#" term="サービス"/><category scheme="http://www.blogger.com/atom/ns#" term="学習"/><category scheme="http://www.blogger.com/atom/ns#" term="野球"/><title type='text'>野球の試合速報共有サービス「BASEBALL SCORE」を公開しました</title><content type='html'>&lt;a href=&quot;https://baseballscore.herokuapp.com/&quot;&gt;BASEBALL SCORE&lt;/a&gt;というwebサービスを公開しました。 &lt;br /&gt;
子供の野球の試合速報を、観戦に来られない家族や知人と共有する事ができます。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhacVhBHCwd86K3TFqxtGqu-qwMBpPGUv2X0bRP24lD2uWORjGi9Pm-bahyphenhyphen_MY09x5RJ-53MleJl1XMTicDifVL_iK0QoAMDH0WYaE9_bLXgbRkwARET6EGD51S0a4gZuj1fJI10G0Nfdi7/s1600/BaseballScore.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhacVhBHCwd86K3TFqxtGqu-qwMBpPGUv2X0bRP24lD2uWORjGi9Pm-bahyphenhyphen_MY09x5RJ-53MleJl1XMTicDifVL_iK0QoAMDH0WYaE9_bLXgbRkwARET6EGD51S0a4gZuj1fJI10G0Nfdi7/s1600/BaseballScore.png&quot; height=&quot;320&quot; width=&quot;268&quot; /&gt;&lt;/a&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn0PZUJqa6Esv87aWDl6OaRV8Tf5NlCwSWZGCT7ADC6jufbQ0ffZmyPcBTVSXmDriQUelCTcw5eX3oRWZCuZP80FLYXgAaEn_iwJRAc_vuuWm6JwE8lnp_ka_QojgQwVrbjvN9xw7Okxwa/s1600/Baseball_Score2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn0PZUJqa6Esv87aWDl6OaRV8Tf5NlCwSWZGCT7ADC6jufbQ0ffZmyPcBTVSXmDriQUelCTcw5eX3oRWZCuZP80FLYXgAaEn_iwJRAc_vuuWm6JwE8lnp_ka_QojgQwVrbjvN9xw7Okxwa/s1600/Baseball_Score2.png&quot; height=&quot;320&quot; width=&quot;180&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h1 id=&quot;開発のきっかけ&quot;&gt;
開発のきっかけ&lt;/h1&gt;
&lt;h3 id=&quot;子供の試合速報を知り合いにメールしまくる家内をみて&quot;&gt;
子供の試合速報を知り合いにメールしまくる家内をみて&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
私には息子が二人いて、長男が中2、次男が小５でどちらも野球チームに所属しています。シーズンになると、週末は二人とも大体試合で、家内と分担してそれぞれの応援に行くわけです。 &lt;br /&gt;
で、互いの試合結果をLINEやメールで送り合うのですが、非常に面倒。しかも家内は、仕事の都合で応援に来れない他の子の母親や、監督・コーチにも同じような試合速報をメールで、せっせと送信している。これでは、試合に全然集中できない。 &lt;br /&gt;
でも、応援に来れない人達は、試合がとても気になる。。。&lt;br /&gt;
こんな、シチュエーションはどこにでもあるはず。すでに、いい感じのサービスが世の中にあるはず。Yahooとかで使える、プロ野球速報の草野球版があるはず。と探すもなかなか見つからない。 &lt;br /&gt;
携帯電話用でスマホでは使いにくかったり、スコアブックとしての機能が充実しすぎていたりと、なかなかニーズに合うものがない。&lt;br /&gt;
って事は作ればいいのでは。。。 &lt;br /&gt;
ちょうど、&lt;a href=&quot;http://railstutorial.jp/&quot;&gt;Ruby on Rails Tutorial&lt;/a&gt;を勉強して、ユーザ管理とtwitterもどきを作れるようになったので、ちょっとしたコンテンツ投稿のサービスに作れるかも。ちょうどいいテーマじないか！って、思った訳です。&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;開発期間&quot;&gt;
開発期間&lt;/h1&gt;
&lt;h3 id=&quot;1週間ぐらいで形になるかと思ったが甘かった&quot;&gt;
1週間ぐらいで形になるかと思ったが甘かった。&lt;/h3&gt;
&lt;br /&gt;
着手から実際に使える状態になるまで、大体3週間かかりました。 &lt;br /&gt;
最初、&lt;a href=&quot;http://railstutorial.jp/&quot;&gt;Ruby on Rails Tutorial&lt;/a&gt;のサンプルをベースにしようとしましたが、すすめていくうちに、他のライブラリに置き換えたり、不具合対応でライブラリのバージョンアップしたりで、何かと時間がかかりました。 &lt;br /&gt;
子供達の野球の試合があるのは週末なので、平日の通勤電車の中で機能実装とバグ潰しを行い、週末に自分と家内で実際に使って、操作の不具合を洗い出しと追加機能のアイデア出しを行う。という事を繰り返しました。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h1 id=&quot;開発環境&quot;&gt;
開発環境&lt;/h1&gt;
&lt;h3 id=&quot;macbook-airとrailsとheroku&quot;&gt;
MacBook AirとRailsとHeroku&lt;/h3&gt;
&lt;br /&gt;
MacBook Air &lt;br /&gt;
Ruby 2.0.0 &lt;br /&gt;
Rails 4.0.4 &lt;br /&gt;
Bootstrap 3&lt;br /&gt;
今まで、Rails 3.2を触っていましたが、&lt;a href=&quot;http://railstutorial.jp/&quot;&gt;Ruby on Rails Tutorial&lt;/a&gt;を勉強するタイミングで、Rails4.0を触り初めていました。 &lt;br /&gt;
この影響で、4.1ではなく4.0で開発する事にしました。 &lt;br /&gt;
Rails4の情報は十分にネットで見つかる状況でした。 &lt;br /&gt;
特に、&lt;a href=&quot;http://stackoverflow.com/&quot;&gt;stackoverflow&lt;/a&gt;と&lt;a href=&quot;http://railscasts.com/&quot;&gt;Rails Casts&lt;/a&gt;を見る機会が多かったです。&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;開発手順&quot;&gt;
開発手順&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;企画 &lt;br /&gt;
「少年野球のスコアを家族。知り合いで共有する」を思いついてから、野球のスコアをつけるアプリをwebサービスを確認しました。アプリは本格的なスコアを付けられるものがほとんどで、「スコアを共有する」目的のものはありませんでした。 &lt;br /&gt;
また、米国のアプリ、webサービスも調査しましたが、状況は同じでした。&lt;a href=&quot;https://itunes.apple.com/us/app/gamechanger-scorekeeping-stats/id318906314?mt=8&quot;&gt;Game Changer&lt;/a&gt;というアプリが無料にもかかわらず、高機能でした。&lt;/li&gt;
&lt;li&gt;言語、WAF(Web Application Framework)の選択 &lt;br /&gt;
上述の通り、Rails4に挑戦する前提でRails4.0とRuby2.0を選択しました。&lt;/li&gt;
&lt;li&gt;サーバ(IaaS,PaaS)の選択 &lt;br /&gt;
以前からHerokuを使っていたので、今回もHerokuを選択しました。まずは1 DynoとPostgreSQLが使えればよかったので、無料でいけます。&lt;/li&gt;
&lt;li&gt;バージョン管理方法の選択 &lt;br /&gt;
gitを選択。 &lt;br /&gt;
いつもgithub使ってましたが、今回はProvateRepositoryで管理の必要性がでてきたので、&lt;a href=&quot;https://bitbucket.org/&quot;&gt;Bitbucket&lt;/a&gt;を使う事にしました。&lt;/li&gt;
&lt;li&gt;開発環境 &lt;br /&gt;
開発環境は上述の通り。IDEは使わず。 &lt;br /&gt;
editorはemacsを使用。 &lt;br /&gt;
Sublime Textに完全移行しようと考えたが、どうしても使い慣れたemacsを使ってしまっていた。 &lt;br /&gt;
localでは、Railsの標準webサーバ(WEBrick)を使用。&lt;/li&gt;
&lt;li&gt;テスト環境 &lt;br /&gt;
RSpecでTDD開発を実践！と思って最初の数週間は、「test書いてから実装」をやっていたのですが、ある程度形になってきたら、testを書くのがもどかしくなってきて、直接コードを書くようになってきました。 &lt;br /&gt;
ただ、実装やコード修正の際、「testが通ればok」の安心感は一人で開発している時には、とてつもない安心感が得られると感じました。&lt;/li&gt;
&lt;li&gt;デザイン &lt;br /&gt;
という程でもないですが、bootstrapを使用。 &lt;br /&gt;
今回、初めてbootstrap3を使用したので、bootstrap2との差異を確認しながら、すすめました。 &lt;br /&gt;
本サービスは、利用シーンとしてスマホでの利用を想定しているのですが、基本的には、bootstrap3ではdefaultでレスポンシブ対応されているので、そちらで対応しました。 &lt;br /&gt;
さらにスマホ表示の最適化させるため、追加で、css微調整を実施しました。&lt;/li&gt;
&lt;li&gt;ドメインの取得 &lt;br /&gt;
当初、score.comのようなシンプルなドメイン取得を予定していましたが、思いつくものは大体取得されていたり、高額だったりしたので諦めました。 &lt;br /&gt;
herokuでは、*.herokuapp.comのようなFQDNは無料で利用可能で、baseballscore.herokuapp.comが利用可能だったので、当面はこれでいくことにしました。 &lt;br /&gt;
後述しますが、SNSなどの口コミで広げていくつもりだったので、URLで表現した時に、わかりやすければいいかなと判断しました。 &lt;br /&gt;
(ただ、途中でFQDN・ドメインを変更するのは、oauth対応やSNSボタンや各種モニタリング登録の変更が必要になり、いろいろと面倒なので、そこは要注意です。)&lt;/li&gt;
&lt;li&gt;アクセス分析 &lt;br /&gt;
google analytics設定を設定しました。 &lt;br /&gt;
より柔軟にリアルタイム分析も行いたかったので、今回は&lt;a href=&quot;https://www.woopra.com/&quot;&gt;woopra&lt;/a&gt;を初めて使ってみました。&lt;/li&gt;
&lt;li&gt;モニタリング &lt;br /&gt;
以前から使用している無料の&lt;a href=&quot;https://www.cman.jp/&quot;&gt;cman&lt;/a&gt;を利用。&lt;/li&gt;
&lt;li&gt;ロゴ &lt;br /&gt;
今回はロゴを準備しました。 &lt;br /&gt;
当初は、&lt;a href=&quot;http://supalogo.com/&quot;&gt;supalogo&lt;/a&gt;で自分で作成しましたが、試しに&lt;a href=&quot;https://coconala.com/&quot;&gt;ココナラ&lt;/a&gt;で作成依頼しました。 &lt;br /&gt;
自分のイメージに合いそうな作成者の方に依頼して3日で2案作成いただきました。うち1案を現在使わせてもらっています。 &lt;br /&gt;
ココナラは以前から気になっていて今回ちょうどお願いできる事があったので利用しました。500円という費用を考えるととても満足のいくものを作成いただきました。&lt;/li&gt;
&lt;li&gt;リリース、プロモーション &lt;br /&gt;
家内を通じて、子供の野球チームの監督・コーチ・保護者の方々にも利用いただき、「これは便利」の声をいただきました。 &lt;br /&gt;
スコアブックを作成するアプリ、webサービスはすでに存在するもののやはり利用には敷居が高く、広く浸透していない事を確認する事ができました。 &lt;br /&gt;
逆にいうと、「詳細スコアブックの作成」ではなく、「スコアを介したコミュニケーション」を主にしたアプリ・webサービスはまだ存在していないので、ユーザ獲得のチャンスがありそうです。 &lt;br /&gt;
プロモーション手段は&lt;a href=&quot;http://www.amazon.co.jp/dp/482224993X&quot;&gt;グロースハッカー&lt;/a&gt;を参考に、facebookを主にしたソーシャル口コミで広げたいと考えています。 &lt;br /&gt;
ただし、家内の知り合いのお母様方はfacebook,twitterではなくLINEを利用している方がほとんどなので、LINEでの露出も意識してすすめる必要があります。 &lt;br /&gt;
まずは、コンテンツ(スコア)を作成してくれる人の獲得が必須です。コンテンツ作成者が増えれば、その人を中心に閲覧者が集まってきて、そのうちの何人かがコンテンツ作成者になり、さらなる閲覧者を集めてくれるからです。 &lt;br /&gt;
次は、グロースハッカーにも書いてあった、小判サメ戦略を試してみたいと思っています。&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h1 id=&quot;今後&quot;&gt;
&lt;/h1&gt;
&lt;h1 id=&quot;今後&quot;&gt;
今後&lt;/h1&gt;
野球の季節である「夏」に、コンテンツ作成ユーザが10人を目指します。 &lt;br /&gt;
&lt;a href=&quot;https://www.facebook.com/baseballscore&quot;&gt;facebook page&lt;/a&gt;を作成したので、これを使ってユーザ獲得施策を実施します。&lt;br /&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h1 id=&quot;参考&quot;&gt;
&lt;/h1&gt;
&lt;h1 id=&quot;参考&quot;&gt;
参考&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://baseballscore.herokuapp.com/&quot;&gt;BASEBALL SCORE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.facebook.com/baseballscore&quot;&gt;facebook page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://railstutorial.jp/&quot;&gt;Ruby on Rails Tutorial&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://railscasts.com/&quot;&gt;Rails Casts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://supalogo.com/&quot;&gt;supalogo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;ココナラ](&lt;a href=&quot;https://coconala.com/&quot;&gt;https://coconala.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amazon.co.jp/dp/482224993X&quot;&gt;グロースハッカー&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
ご興味ある方は、&lt;a href=&quot;https://baseballscore.herokuapp.com/&quot;&gt;BASEBALL SCORE&lt;/a&gt;をぜひお試しください！</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/3573528899767279681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/3573528899767279681'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2014/07/web.html' title='野球の試合速報共有サービス「BASEBALL SCORE」を公開しました'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhacVhBHCwd86K3TFqxtGqu-qwMBpPGUv2X0bRP24lD2uWORjGi9Pm-bahyphenhyphen_MY09x5RJ-53MleJl1XMTicDifVL_iK0QoAMDH0WYaE9_bLXgbRkwARET6EGD51S0a4gZuj1fJI10G0Nfdi7/s72-c/BaseballScore.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-4906876595681665984</id><published>2014-04-12T15:39:00.001+09:00</published><updated>2014-04-12T15:39:28.144+09:00</updated><title type='text'>RVMでruby1.9.3 installの際、gcc46を使わない方法</title><content type='html'>何かの手違いでgcc46を削除したようなので、homebrewで再度gcc46をinstallしようとしたが、途中で止まってすすまない。&lt;div&gt;
再度、rvm install 1.9.3しても、やはりgcc46のところで止まってしまう。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://github.com/wayneeseguin/rvm/issues/2133&quot; target=&quot;_blank&quot;&gt;こちら&lt;/a&gt;をみて下記を実行したらうまくいった。&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #f8f8f8; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-top-left-radius: 3px; border-top-right-radius: 3px; border: 1px solid rgb(221, 221, 221); box-sizing: border-box; color: #333333; font-family: Consolas, &#39;Liberation Mono&#39;, Courier, monospace; font-size: 13px; line-height: 19px; margin-bottom: 15px; margin-top: 15px; overflow: auto; padding: 6px 10px; word-wrap: normal;&quot;&gt;rvm install 1.9.3 --with-gcc&lt;span class=&quot;o&quot; style=&quot;box-sizing: border-box; font-weight: bold;&quot;&gt;=&lt;/span&gt;clang&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4906876595681665984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4906876595681665984'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2014/04/rvmruby193-installgcc46.html' title='RVMでruby1.9.3 installの際、gcc46を使わない方法'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-2241031371610797748</id><published>2013-12-31T12:08:00.001+09:00</published><updated>2014-01-01T15:32:06.050+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IT"/><category scheme="http://www.blogger.com/atom/ns#" term="まとめ"/><category scheme="http://www.blogger.com/atom/ns#" term="アプリ"/><category scheme="http://www.blogger.com/atom/ns#" term="コンテスト"/><category scheme="http://www.blogger.com/atom/ns#" term="プレゼン"/><category scheme="http://www.blogger.com/atom/ns#" term="プログラミング"/><title type='text'>IT関連コンテスト情報まとめてみた</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfdQQ3O8K8O6oehT7-JdKa4s2g8S0bKUVkATE8TPcLA8_8-7zfVY-Fy1b-rQdn-bvB5ZFnovWGZms6dl3AfbNU006sAIlRIQuoEWLIFbA621xcJHYKj1c5djdbTLVPAJCGm3wvpfMGvr6/s1600/531958213757c37c63339d73be0332d1_s.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfdQQ3O8K8O6oehT7-JdKa4s2g8S0bKUVkATE8TPcLA8_8-7zfVY-Fy1b-rQdn-bvB5ZFnovWGZms6dl3AfbNU006sAIlRIQuoEWLIFbA621xcJHYKj1c5djdbTLVPAJCGm3wvpfMGvr6/s1600/531958213757c37c63339d73be0332d1_s.jpg&quot; height=&quot;213&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
最近、次男が通う小学校の教頭先生から小学生向けプレゼンコンテストを教えてもらったり、@jishihaから三鷹のU15,U18 rubyコンテストを教えてもらいました。&lt;br /&gt;
&lt;div&gt;
思った以上にIT系のコンテスト多い、しかも小中学生が参加できるものもある、賞品・賞金もでる。結構、おいしいんじゃないかと。(@jishihaの受け売りだけど)&lt;/div&gt;
&lt;div&gt;
で、まとめてみました。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://itcontest.wiki.fc2.com/&quot;&gt;http://itcontest.wiki.fc2.com/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
まとめてみると、ITコンテストといってもいろいろな種類がある。プログラム、アプリ、サーバ系そして企画・プレゼン系。&lt;/div&gt;
&lt;div&gt;
中高校生が参加できるものから小学生が参加できるものや、チームで参加のもの。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
まだまだ編集中ですが、まずは公開したいと思います。早いうちに、アプリ系のコンテスト情報追加します…&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
(2013/12/31)アプリ系コンテスト情報追加しました&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/2241031371610797748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/2241031371610797748'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/12/it.html' title='IT関連コンテスト情報まとめてみた'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwfdQQ3O8K8O6oehT7-JdKa4s2g8S0bKUVkATE8TPcLA8_8-7zfVY-Fy1b-rQdn-bvB5ZFnovWGZms6dl3AfbNU006sAIlRIQuoEWLIFbA621xcJHYKj1c5djdbTLVPAJCGm3wvpfMGvr6/s72-c/531958213757c37c63339d73be0332d1_s.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-6046060315884805014</id><published>2013-12-16T03:07:00.001+09:00</published><updated>2013-12-16T12:15:40.295+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CloudStack"/><category scheme="http://www.blogger.com/atom/ns#" term="vagrant"/><title type='text'>vagrant-cloudstackを試してみた</title><content type='html'>いまいち周りで、vagrant-cloudstackが盛り上がらないなーと思っていた所、所属する会社の若手エンジニアS君に「vagrant-cloudstackってのがあるんだけどさー、&lt;a href=&quot;http://www.idcf.jp/cloud/&quot;&gt;IDCFクラウドセルフタイプ&lt;/a&gt;でうまく動かないんだよね。」と相談したところ「あ、直しました。本家にPullRequest出してます」と即答。数日後無事マージされた事を確認。ただし、本家のvagrant-cloudstackの機能制限のため、vagrant up,destroyぐらいしかできない。vagrant ssh接続もできない。もちろんsshを利用するprovisionも実行できない。。。という状況でした。&lt;br /&gt;
&lt;br /&gt;
そこで同じくS君に「vagrantはprovisionできないと意味ないよね」と相談したところ、数日後「直しました。PullRequest中です。CloudStackはVM作成とは別に、ネットワーク周りの設定(FW、PortForwarding)を追加しないといけないので機能追加しました」との事。 &lt;br /&gt;
それから待つこと約2週間。やっと本家にマージされたので、vagrant-cloudstackとIaaSとして私が携わっている&lt;a href=&quot;http://www.idcf.jp/cloud/&quot;&gt;IDCFクラウドセルフタイプ&lt;/a&gt;を使って、VM作成およびサーバ構築の自動化までの方法を紹介したいと思います。&lt;br /&gt;
&lt;br /&gt;
今回はIDCFクラウドセルフタイプを使いますが、CloudStackであれば他事業者のものでも、自社や自宅ラックで動かしているCloudStack環境でも、Vagrantfileのパラメータを変更するだけで利用可能なはずです。  &lt;br /&gt;
それでは始めます。&lt;br /&gt;
&lt;br /&gt;
&lt;h3 id=&quot;vagarntとは&quot;&gt;
Vagarntとは&lt;/h3&gt;
Vagrant(ベイグラント)は&lt;a href=&quot;https://www.virtualbox.org/&quot;&gt;VirtualBox&lt;/a&gt;のフロントエンドに相当するツールです。vagrantコマンドなどを使ってコマンドラインから簡単に新しい仮想マシンを削除したり、不要なVMを削除したりできます。 オープンソースとして公開されています。各種ドキュメントは下記で公開されています。 &lt;br /&gt;
&lt;a href=&quot;http://www.vagrantup.com/&quot;&gt;http://www.vagrantup.com/&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
VagrantはVM作成後のソフトウェア構築の自動化にも対応しており、その場合はshellやChefSolo,Puppet,Ansibleなどのdeploy toolと連携します。今回は、ChefSoloを使用します。&lt;br /&gt;
今回はChefおよびChefSoloの説明は割愛しますが、興味のある方は後述の参考情報をご参照ください。
(@naoyaさんの入門Chef Soloから入るのが王道です)&lt;br /&gt;
&lt;br /&gt;
&lt;h3 id=&quot;vagrant-cloudstackとは&quot;&gt;
vagrant-cloudstackとは&lt;/h3&gt;
Vagrantの&lt;a href=&quot;https://github.com/klarna/vagrant-cloudstack&quot;&gt;plugin&lt;/a&gt;です。
上述の通り、Vagrantは元々local PCのVirtualBoxのフロントエンドとして開発されたものですが、VMWareにも対応し、その後、pluginをinstallすることで、様々な機能を追加できるようになりました。 &lt;br /&gt;
&lt;br /&gt;
そのpluginの中で、外部環境の仮想マシンの起動やprovisionができるようにしたのが、&lt;a href=&quot;https://github.com/mitchellh/vagrant-aws&quot;&gt;vagrant-aws plugin&lt;/a&gt;があります。&lt;br /&gt;
その後、同じように外部環境を使えるpluginが開発されています。 現在、私の方で確認したものは下記の通りです。これらは&lt;code&gt;vagrant plugin installコマンド&lt;/code&gt;でinstallできます。(詳細は各ドキュメントをご参照ください)&lt;br /&gt;
&lt;a href=&quot;https://github.com/mitchellh/vagrant-aws&quot;&gt;vagrant-aws&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;https://github.com/FlaPer87/vagrant-openstack&quot;&gt;vagrant-openstack&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;https://github.com/mitchellh/vagrant-rackspace&quot;&gt;vagrant-rackspace&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;https://github.com/smdahlen/vagrant-digitalocean&quot;&gt;vagrant-digitalocean&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;https://github.com/klarna/vagrant-cloudstack&quot;&gt;vagrant-cloudstack&lt;/a&gt;  &lt;br /&gt;
&lt;br /&gt;
上記以外のpluginについては下記をご参照ください。外部環境の仮想マシンを使うもの以外にも、vagrant-omnibus、vagrant-berkshelf、saharaなど様々なpluginが開発されています。 &lt;br /&gt;
&lt;a href=&quot;http://www.rubydoc.info/gems/v&quot;&gt;http://www.rubydoc.info/gems/v&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2013年12月現在、vagrant-cloudstackの機能は下記の通りです。(&lt;a href=&quot;https://github.com/klarna/vagrant-cloudstack/blob/master/CHANGELOG.md&quot;&gt;changelog&lt;/a&gt;抜粋)&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;0.1.0
* Plugin now enables parallelization by default.
 + This behaviour can be turned off by invoking vagrant with --no-parallel (this flag requires vagrant 1.2.1)
* Added support for starting, stoping and reloading machines.
* Added support for portforwarding and adding ssh keys.
* Added support for basic network type.
 + Basic means that there is no need to specify a network_id to connecto to.
 + Default network type is advanced.
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h3 id=&quot;cloudstackとidcfクラウドセルフタイプ&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;cloudstackとidcfクラウドセルフタイプ&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;cloudstackとidcfクラウドセルフタイプ&quot;&gt;
CloudStackとIDCFクラウドセルフタイプ&lt;/h3&gt;
&lt;a href=&quot;http://cloudstack.apache.org/&quot;&gt;CloudStack&lt;/a&gt;はオープンソースのクラウド基盤管理ソフトウェアで、コンピューティングリソースをプールすることにより、パブリック、プライベート、およびハイブリッドのIaaS（Infrastructure as a Service）クラウドを構築することができます。 &lt;br /&gt;
同じようなソフトウェアで&lt;a href=&quot;http://www.openstack.org/&quot;&gt;OpenStack&lt;/a&gt;、&lt;a href=&quot;https://github.com/axsh/wakame-vdc/wiki&quot;&gt;Wakame&lt;/a&gt;等があります。&lt;br /&gt;
&lt;br /&gt;
私が所属する&lt;a href=&quot;http://www.idcf.jp/&quot;&gt;IDCフロンティア&lt;/a&gt;では、2011年９月よりCloudStackを使用したIaaSサービス &lt;a href=&quot;http://www.idcf.jp/cloud/service/self.html&quot;&gt;IDCFクラウドセルフタイプ&lt;/a&gt;(以下、IDCFクラウド)を提供しています。 &lt;br /&gt;
IDCFクラウドでは、&lt;a href=&quot;http://www.idcf.jp/cloud/docs/&quot;&gt;CloudStack API&lt;/a&gt;を利用可能です。 &lt;br /&gt;
vagrant-cloudstackでは、このCloudStack APIを利用して、CloudStack環境上に仮想マシンを作成します。&lt;br /&gt;
&lt;h3 id=&quot;環境&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;環境&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;環境&quot;&gt;
環境&lt;/h3&gt;
今回はローカルPCとして、MacBook Air(MBA)でVagrant環境を用意します。予め、MBAに下記をinstallします。&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;ローカル環境 &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;MBA(MacOSX10.9、メモリ8GB、HDD250GB)  &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;ソフトウェア
&lt;ul&gt;
&lt;li&gt;VirtualBox 4.3.2 &lt;br /&gt;
下記からDL,installします。 &lt;br /&gt;
&lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot;&gt;https://www.virtualbox.org/wiki/Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Vagrant 1.3.5 &lt;br /&gt;
下記からDL,installします。 &lt;br /&gt;
&lt;a href=&quot;http://downloads.vagrantup.com/&quot;&gt;http://downloads.vagrantup.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Ruby 1.9.3p327 &lt;br /&gt;
rbenvを使用&lt;/li&gt;
&lt;li&gt;Bundler 1.3.5 &lt;br /&gt;
ローカルMBAのCLIより、下記コマンドを実施 &lt;br /&gt;
&lt;code&gt;$ gem install bundler&lt;/code&gt;  &lt;/li&gt;
&lt;li&gt;Vargrant plugin &lt;br /&gt;
ローカルMBAのCLIより、下記コマンドを実施
&lt;ul&gt;
&lt;li&gt;vagrant-berkshelf 1.3.3 &lt;br /&gt;
&lt;code&gt;$ vagrant plugin install vagrant-berkshelf&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;vagrant-omnibus 1.1.2
&lt;code&gt;$ vagrant plugin install vagrant-omnibus&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;vagrant-cloudstack 0.1.0
&lt;code&gt;$ vagrant plugin install vagrant-cloudstack&lt;/code&gt;   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;設定方針&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;設定方針&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;設定方針&quot;&gt;
vagrant-cloudstack設定方針&lt;/h3&gt;
&lt;div&gt;
ローカルPCの仮想環境にて仮想マシンを作成する場合には、Vagrant用に設定されたイメージ(vagrantbox)を使用しますが、外部環境を利用する場合はvagrantboxは利用できません。&lt;/div&gt;
&lt;div&gt;
今回は、IDCFクラウドにて用意されているUbuntu12.04テンプレートを用いて仮想マシンを作成し、その後、必要な設定を追加していきます。&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;今回はvagrant-cloudstack利用に必要な最小限の設定ファイル(Vagrantfileおよびscript.sh)を用意。それ以外は、VirtualBox環境で利用していたものを利用する(ChefRecipeなど)&lt;/li&gt;
&lt;li&gt;IDCFクラウドのUbuntu12.04テンプレートを使用&lt;/li&gt;
&lt;li&gt;id:rootでvagrantの設定を実施&lt;/li&gt;
&lt;li&gt;vagrant boxの基本設定と同様に、id:vagrantも作成し、no passwordでsudoできるようにしておく。&lt;/li&gt;
&lt;li&gt;外部からのsshアクセス用のportは2222を使用&lt;/li&gt;
&lt;li&gt;installするものは以下の通り。
&lt;ul&gt;
&lt;li&gt;公開されているcookbookを利用して、rvmをinstallし、ruby1.9.3を指定&lt;/li&gt;
&lt;li&gt;自作cookbook(site-cookbook)にて、apche2とmysql-serverをinstall&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;注意事項&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;注意事項&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;注意事項&quot;&gt;
注意事項&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://noahcloud.jp/&quot;&gt;IDCFクラウド&lt;/a&gt;でアカウント作成後、一度、webのコントロール画面から仮想マシンを作成してください。そうする事で、ネットワークとしてIPアドレスが1つ作成されます。このIPアドレスを使用します。&lt;/li&gt;
&lt;li&gt;またできれば、上記で作成した仮想マシンは起動した状態で、以下のvagrant-cloudstackの作業を実施してください。(CloudStackでは仮想マシンが0台になると、FW,PortForwarding,DHCP機能を提供するVR(VirtualRouter)が一旦停止し、再度仮想マシンを起動するVRの起動も行うため、余分に時間がかかるためです)&lt;/li&gt;
&lt;li&gt;仮想マシン起動中は、料金が発生しますのでご注意ください。作業終了後は起動しっぱなしの仮想マシンがないか確認するようにしましょう。&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;設定内容&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;設定内容&quot;&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 id=&quot;設定内容&quot;&gt;
設定内容&lt;/h3&gt;
1. Vagrant環境設定用スクリプトを用意&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;scripts/script.sh&lt;/code&gt;として下記ファイルを用意します。&lt;/li&gt;
&lt;li&gt;内容は&lt;a href=&quot;http://docs.vagrantup.com/v2/boxes/base.html&quot;&gt;こちら&lt;/a&gt;と、&lt;a href=&quot;http://www.vagrantbox.es/&quot;&gt;vagrantbox.es&lt;/a&gt;のpostinstall.shを参考にしています。&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;/ol&gt;
&lt;h6 id=&quot;title&quot;&gt;
 &lt;/h6&gt;
&lt;pre&gt;&lt;code&gt;#!/bin/bash

account=$1

useradd -p vagrant -m $account -s /bin/bash
    sed -i -e &#39;/Defaults\s\+env_reset/a Defaults\texempt_group=admin&#39; /etc/sudoers
    groupadd -r admin || true
    usermod -a -G admin $account
sed -i -e &#39;s/%admin ALL=(ALL) ALL/%admin ALL=(ALL) NOPASSWD:ALL/g&#39; /etc/sudoers
echo &#39;UseDNS no&#39; &amp;gt;&amp;gt; /etc/ssh/sshd_config

vssh=&quot;/home/${account}/.ssh&quot;
    mkdir -p $vssh
chmod 700 $vssh
    (cd $vssh &amp;amp;&amp;amp;
  wget --no-check-certificate \
    &#39;https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub&#39; \
    -O $vssh/authorized_keys)
    chmod 0600 $vssh/authorized_keys
chown -R ${account}:vagrant $vssh
unset vssh
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
2. Vagrantfile作成&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(&quot;2&quot;) do |config|

#  config.ssh.username = &quot;vagrant&quot;
  config.ssh.username = &quot;root&quot;
  config.ssh.private_key_path = &quot;~/.ssh/id_rsa&quot; # IDCFクラウドで仮想マシンを作成時に指定したSSH鍵の秘密鍵を指定
  config.ssh.port = &quot;2222&quot;

  config.vm.box = &quot;dummy&quot;
  config.vm.box_url = &quot;https://github.com/klarna/vagrant-cloudstack/raw/master/dummy.box&quot;

  config.vm.provider :cloudstack do |cloudstack, override|
    cloudstack.scheme = &quot;https&quot;　　　　　　# IDCFクラウドAPI設定
    cloudstack.host = &quot;api.noahcloud.jp&quot;   # 同上
    cloudstack.port = &quot;443&quot;                # 同上
    cloudstack.path = &quot;/portal/client/api&quot; # 同上
    cloudstack.api_key = &quot;*****&quot;           # 画面右上の[マイプロファイル]から[API資格情報]の[API鍵]をコピペ
    cloudstack.secret_key = &quot;*****&quot;        # 同じく秘密鍵をコピペ

    cloudstack.template_id = &quot;2212&quot;        # IDCFクラウドで使用するテンプレートのIDを指定。今回はIDCFが提供するUbuntu12.04を指定。
    cloudstack.service_offering_id = &quot;24&quot;  #IDCFクラウドの仮想マシンタイプ:XSを指定
    cloudstack.zone_id = &quot;2&quot;               # 2ゾーンあるうち、ゾーン2を指定
    cloudstack.keypair = &quot;*****&quot;           # IDCFクラウドで仮想マシンを作成時に指定したSSH鍵の秘密鍵を指定

    cloudstack.pf_ip_address_id = &quot;*****&quot;  # 使用するIPのIDを使用。[マイリソース]-[ネットワーク]で確認
    cloudstack.pf_public_port = &quot;2222&quot;
    cloudstack.pf_private_port = &quot;22&quot;

    cloudstack.instance_ready_timeout = 1800
  end

  # Chef-solo
  config.berkshelf.enabled = true
  config.omnibus.chef_version = :latest


  config.vm.provision :shell do |shell|
    shell.path = &quot;scripts/script.sh&quot;   # 上述のscript.shを指定
    shell.args = &quot;vagrant&quot;             # script.shの引数を指定
  end

  config.vm.provision :chef_solo do |chef|
    chef.cookbooks_path = [&quot;./cookbooks&quot;, &quot;./site-cookbooks&quot;]
    chef.add_recipe &quot;apt&quot;
    chef.add_recipe &quot;rvm::system&quot;
    chef.add_recipe &quot;rvm::vagrant&quot;
    chef.add_recipe &quot;myapp&quot;

    chef.json = {
      &quot;rvm&quot; =&amp;gt; {
        &quot;default_ruby&quot; =&amp;gt; &quot;ruby-1.9.3-p448&quot;,
        &quot;global_gems&quot; =&amp;gt; [
          {&quot;name&quot; =&amp;gt; &quot;bundler&quot;}
        ]
      }
    }
  end
end
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
3. 仮想マシンを作成 &lt;br /&gt;
下記を実行&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;vagrant up --provider=cloudstack
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
4. 仮想マシン作成完了後、仮想マシンにsshで接続 &lt;br /&gt;
そのまま&lt;code&gt;vagrant ssh&lt;/code&gt;を実行すると、Vagrantfileの内容に従って、rootとして接続します。&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ vagrant ssh
[fog][WARNING] Unable to load the &#39;unf&#39; gem. Your AWS strings may not be properly encoded.
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

*** System restart required ***
    ________  ______   ______                 __  _          
   /  _/ __ \/ ____/  / ____/________  ____  / /_(_)__  _____
   / // / / / /      / /_  / ___/ __ \/ __ \/ __/ / _ \/ ___/
 _/ // /_/ / /___   / __/ / /  / /_/ / / / / /_/ /  __/ /    
/___/_____/\____/  /_/   /_/   \____/_/ /_/\__/_/\___/_/     


root@i-229-51079-VM:~#
&lt;/code&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
5. id:vagrantとして、仮想マシンにsshで接続 &lt;br /&gt;
下記の通り、Vagrantfileを一部コメントアウトすることで、仮想マシン作成時に作成したid:vagrantとしてsshアクセスします。vagrantからsudoコマンドを使って、操作可能です。&lt;br /&gt;
&lt;ol&gt;
&lt;/ol&gt;
&lt;h6 id=&quot;title-1&quot;&gt;
 &lt;/h6&gt;
&lt;pre&gt;&lt;code&gt;#  config.ssh.username = &quot;vagrant&quot;               # この行はコメントインしてもいいが、default値が&quot;vagrant&quot;のため、コメントアウトのままでもよい。
#  config.ssh.username = &quot;root&quot;                  # コメントアウト
#  config.ssh.private_key_path = &quot;~/.ssh/id_rsa&quot; # コメントアウト
&lt;/code&gt;&lt;/pre&gt;
下記の通り、login後のidがvagrantになっていることが分かります。&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ vagrant ssh
[fog][WARNING] Unable to load the &#39;unf&#39; gem. Your AWS strings may not be properly encoded.
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

*** System restart required ***
    ________  ______   ______                 __  _          
   /  _/ __ \/ ____/  / ____/________  ____  / /_(_)__  _____
   / // / / / /      / /_  / ___/ __ \/ __ \/ __/ / _ \/ ___/
 _/ // /_/ / /___   / __/ / /  / /_/ / / / / /_/ /  __/ /    
/___/_____/\____/  /_/   /_/   \____/_/ /_/\__/_/\___/_/     


vagrant@i-229-51079-VM:~$ id
uid=1000(vagrant) gid=1000(vagrant) groups=1000(vagrant),999(admin),1001(rvm)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;サンプルファイル&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;サンプルファイル&quot;&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 id=&quot;サンプルファイル&quot;&gt;
サンプルファイル&lt;/h3&gt;
&lt;a href=&quot;https://github.com/snumano/vagrant-cloudstack-test&quot;&gt;github&lt;/a&gt;に置きました。&lt;br /&gt;
個人に依存するパラメータは伏せ字(*****)にしていますので、適宜適切なパラメータを設定してください。&lt;br /&gt;
&lt;h3 id=&quot;課題&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;課題&quot;&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 id=&quot;課題&quot;&gt;
課題&lt;/h3&gt;
今回の作業にあたって、下記不具合が確認されました。とりあえず、目的のCloudStack上での仮想マシンの作成は達成できたので、後日調査する事とします。&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;自作cookbook(site-cookbook)内のrecipeのserviceリソースが正常に動作しない &lt;br /&gt;
通常のVirtualBox環境では動作していたので、vagrant-cloudstackの現在の動作制限もしくは不具合かも。&lt;/li&gt;
&lt;li&gt;&lt;code&gt;vagrant ssh&lt;/code&gt;実行時。下記warningが表示される。 &lt;br /&gt;
vagrant-cloudstackはvagrant-awsをfolkして作成されており、そこで利用しているgemに依存している模様。  &lt;/li&gt;
&lt;/ul&gt;
&lt;h6 id=&quot;title-2&quot;&gt;
 &lt;/h6&gt;
&lt;pre&gt;&lt;code&gt;[fog][WARNING] Unable to load the &#39;unf&#39; gem. Your AWS strings may not be properly encoded.
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;今回はUbuntu12.04について紹介したが、CentOSを使用する場合は、今回紹介した設定以外に事前に設定すべき箇所がある模様。&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h3 id=&quot;まとめ&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;まとめ&quot;&gt;
まとめ&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;駆け足でしたが、vagrant-cloudstackを使用して、IDCFクラウド上に仮想マシンを作成し、さらにソフトウェアのinstallする方法を紹介しました。&lt;/li&gt;
&lt;li&gt;Vagrant+ChefSoloでlocal PC上に開発環境作成後、IaaS上に本番環境をdeployする流れがイメージいただけたら幸いです。&lt;/li&gt;
&lt;li&gt;S君ありがとう！&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h3 id=&quot;参考情報&quot;&gt;
&lt;/h3&gt;
&lt;h3 id=&quot;参考情報&quot;&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 id=&quot;参考情報&quot;&gt;
参考情報&lt;/h3&gt;
&lt;a href=&quot;http://qiita.com/taiki45/items/b46a2f32248720ec2bae&quot;&gt;今っぽい Vagrant + Chef Solo チュートリアル&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;http://qiita.com/yusabana/items/9dac70b7bbba49f3cdb7&quot;&gt;Berkshelfベースにvagrant, chef(knife-solo)環境を簡単に構築する方法&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;http://dotinstall.com/lessons/basic_vagrant&quot;&gt;dotinstall Vagrant入門&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;http://www.amazon.co.jp/dp/B00BSPH158&quot;&gt;入門Chef Solo - Infrastructure as Code&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;http://dotinstall.com/lessons/basic_chef&quot;&gt;dotinstall Chef入門&lt;/a&gt; &lt;br /&gt;
&lt;a href=&quot;http://magazine.rubyist.net/?0035-ChefInDECOLOG#l1&quot;&gt;RubyistMagazineChef でサーバ管理を楽チンにしよう！ (第 1 回)&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/6046060315884805014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/6046060315884805014'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/12/vagrant-cloudstack.html' title='vagrant-cloudstackを試してみた'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-6688774316254926784</id><published>2013-11-30T11:04:00.001+09:00</published><updated>2013-11-30T11:06:05.133+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mail"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>rubyでHTML mail送信してみる</title><content type='html'>タイトルの通り、mail送信する事がでてきたので準備してみました。 &lt;br /&gt;
ポイントは下記&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;全体的にシンプルに&lt;/li&gt;
&lt;li&gt;HTML部分はERBを使用&lt;/li&gt;
&lt;li&gt;全てを1fileで、見通しよく&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h3 id=&quot;mail送信ライブラリを選ぶ&quot;&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 id=&quot;mail送信ライブラリを選ぶ&quot;&gt;
mail送信ライブラリを選ぶ&lt;/h3&gt;
mail送信ライブラリですが、&lt;a href=&quot;https://www.ruby-toolbox.com/categories/e_mail&quot;&gt;ruby toolbox&lt;/a&gt;をみると、Action MailerとMailの2つが主なライブラリのようです。 &lt;br /&gt;
さらに&lt;a href=&quot;http://qiita.com/KitaitiMakoto/items/688d383dc831c8b9a7f9&quot;&gt;こちら&lt;/a&gt;をみると、Action MailerもMailも書き方はあまり変わらないようです。今回はRubyでMailを送信するだけなので、Mailを使うことにします。&lt;br /&gt;
&lt;h3 id=&quot;erbを使う&quot;&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 id=&quot;erbを使う&quot;&gt;
ERBを使う&lt;/h3&gt;
&lt;a href=&quot;http://railsdoc.com/view&quot;&gt;ERB&lt;/a&gt;はHTMLなどの文章の中にRubyスクリプトを埋め込むためのライブラリです。 &lt;br /&gt;
Railsで、erb fileで馴染みがあったので、今回同じように使いたいなと思った次第です。
ERBについては、&lt;a href=&quot;http://magazine.rubyist.net/?0017-BundledLibraries&quot;&gt;るびま&lt;/a&gt;の説明が参考になりました。標準添付なのであらためてのinstall不要です。&lt;br /&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h3 id=&quot;dataとendを使う&quot;&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 id=&quot;dataとendを使う&quot;&gt;
DATAと__END__を使う&lt;/h3&gt;
Perlの__DATA__と同様に、RubyではDATAと__END__で、スクリプトファイルにDATAを埋め込むことができます。
DATA部分の読み込みは上述のるびまのサンプルを参考にしました。&lt;br /&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h3 id=&quot;サンプル&quot;&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 id=&quot;サンプル&quot;&gt;
サンプル&lt;/h3&gt;
以上よりサンプルを作ってみました。 &lt;br /&gt;
事前にMailライブラリは&lt;code&gt;gem install mail&lt;/code&gt;などでinstallしてください。
下記は、smtpサーバを指定していますが、スクリプト動かしているマシンのsendmailに渡せるのであれば、sendmailを使った方が簡単です。&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;#! /usr/bin/env ruby
# -*- coding: utf-8 -*-
require &#39;mail&#39;
require &#39;erb&#39;

user = &#39;あああ&#39;
name = &#39;いいい &#39;

mail = Mail.new do
  from    &#39;aaa@aaa.com&#39;
  to      &#39;bbb@bbb.com&#39;
  subject &#39;sample_subject&#39;
  html_part do
    content_type &#39;text/html; charset=UTF-8&#39;
    body ERB.new(DATA.read).result(binding)
  end
end

# sendmailに渡すだけでよければ、こちらをコメントイン
=begin
mail.delivery_method :sendmail
mail.deliver
=end

# sendmailに渡すだけでよければ、こちらをコメントアウト
mail.delivery_method :smtp, {
  address: &#39;smtp.aaa.com&#39;,
  port:    587,
  domain:  &#39;aaa.com&#39;,
  user_name:    &#39;aaa@aaa.com&#39;,
  password:     &#39;xxxxxxxxxxxxxxx&#39;,
}
mail.deliver

__END__
&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;こんにちは、&amp;lt;%= user %&amp;gt;さん!&amp;lt;/h1&amp;gt;
    &amp;lt;p&amp;gt;
      あなたの名前は&amp;lt;%= name %&amp;gt;さんです。よろしくね!
    &amp;lt;/p&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&quot;se-section-delimiter&quot;&gt;
&lt;/div&gt;
&lt;h3 id=&quot;まとめ&quot;&gt;
&lt;br /&gt;&lt;/h3&gt;
&lt;h3 id=&quot;まとめ&quot;&gt;
まとめ&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;書いてみるとこんだけなんですが、調べるとそのものずばりの情報がなかったので、忘備録として書いてみました。&lt;/li&gt;
&lt;li&gt;「こんな方法があるよ」的な話があると教えてもらえると幸いです。&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/6688774316254926784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/6688774316254926784'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/11/rubyhtml-mail.html' title='rubyでHTML mail送信してみる'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-7669628613971156629</id><published>2013-11-20T05:55:00.001+09:00</published><updated>2013-11-26T08:37:16.389+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="vagrant"/><category scheme="http://www.blogger.com/atom/ns#" term="VirtualBox"/><title type='text'>VBoxManage: error: Failed to create the host-only adapter</title><content type='html'>最近、Vagrant upをするとエラーが発生するようになりました。 &lt;br /&gt;
本事象は、下記環境で発生するようです。&lt;br /&gt;
&lt;pre class=&quot;prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;typ&quot;&gt;MacOSX&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;10.9&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;VirtualBox&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;4.2&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;18&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; r88780&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
エラー内容は下記。&lt;br /&gt;
&lt;pre class=&quot;prettyprint prettyprinted&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;$ vagrant up
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Bringing&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; machine &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;default&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; up &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;virtualbox&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; provider&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Importing&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;base&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; box &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;precise64&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Matching&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; MAC address &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; NAT networking&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Setting&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; the name of the VM&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Clearing&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; any previously &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; forwarded ports&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;This&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; version of the &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; plugin has &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;not&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; been fully tested on &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; version of &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Vagrant&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;You&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; should check &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; a newer version of vagrant&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;If&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; you encounter any errors &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;with&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; version&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; please report them at https&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;//github.com/RiotGames/vagrant-berkshelf/issues&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;You&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; can also join the discussion &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot;&gt;#berkshelf on Freenode.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Updating&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Vagrant&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;s berkshelf: &#39;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Users&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;snumano&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;vagrant&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;20131119&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;2647&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;nx5ysd&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;
[Berkshelf] Using apt (1.9.0)
[Berkshelf] Installing rvm (0.9.1) from git: &#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;git&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;//github.com/fnichol/chef-rvm.git&#39; with branch: &#39;master&#39; at ref: &#39;7038fb8c518d0d7785767de215b1ae463f237973&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Using&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; myapp &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; at &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&#39;./chef/site-cookbooks/myapp&#39;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Using&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; java &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;1.13&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Using&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; windows &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;1.10&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Using&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; chef_handler &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;1.1&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Berkshelf&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Using&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; chef_gem &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Pruning&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; invalid NFS exports&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Administrator&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; privileges will be required&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Password&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Creating&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; shared folders metadata&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Clearing&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; any previously &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;set&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; network interfaces&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;There&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; was an error &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; executing &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;`VBoxManage`&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; a CLI used &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;by&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Vagrant&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;for&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; controlling &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;VirtualBox&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;The&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; command &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;and&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; stderr &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;is&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; shown below&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Command&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;hostonlyif&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;create&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Stderr&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;%...&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Progress&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; state&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; NS_ERROR_FAILURE
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;VBoxManage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; error&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Failed&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; to create the host&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;only adapter
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;VBoxManage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; error&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;VBoxNetAdpCtl&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Error&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; adding &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; failed to open &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;dev&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;vboxnetctl&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;No&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; such file &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;or&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; directory

&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;VBoxManage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; error&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Details&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; code NS_ERROR_FAILURE &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0x80004005&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;),&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; component &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;HostNetworkInterface&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;interface&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;IHostNetworkInterface&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;VBoxManage&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; error&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;Context&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;str&quot;&gt;&quot;int handleCreate(HandlerArg*, int, int*)&quot;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; at line &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;68&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; of file &lt;/span&gt;&lt;span class=&quot;typ&quot;&gt;VBoxManageHostonly&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;cpp&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
対応は&lt;a href=&quot;http://stackoverflow.com/questions/18149546/vagrant-up-failed-dev-vboxnetctl-no-such-file-or-directory&quot;&gt;こちら&lt;/a&gt;を参考に、Local PC側で&lt;code&gt;sudo /Library/StartupItems/VirtualBox/VirtualBox restart&lt;/code&gt;を実行するだけ。再度&lt;code&gt;vagrant up&lt;/code&gt;すれば正常に起動します。&lt;br /&gt;
VirtualBox4.3.0でも上記事象は継続するようですが対応コマンドが、&lt;code&gt;sudo launchctl load /Library/LaunchDaemons/org.virtualbox.startup.plist&lt;/code&gt;に変わるので注意。 &lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/18149546/vagrant-up-failed-dev-vboxnetctl-no-such-file-or-directory&quot;&gt;こちら&lt;/a&gt;によるとVirtualBox4.3.2で、本事象は解消されるそうです。VirtualBox起動後、「アップデートを確認」では4.3.2を見つけてくれませんでしたが、&lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot;&gt;DownLoadサイト&lt;/a&gt;では、4.3.2が公開されています。&lt;br /&gt;
&lt;br /&gt;
### 追記(2013/11/26) ###&lt;br /&gt;
VirtualBox4.3.2にupgradeして、本事象解消を確認しました。</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/7669628613971156629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/7669628613971156629'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/11/vboxmanage-error-failed-to-create-host.html' title='VBoxManage: error: Failed to create the host-only adapter'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-7408835624677308757</id><published>2013-11-17T11:50:00.001+09:00</published><updated>2013-11-17T12:02:57.457+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="まとめ"/><title type='text'>MarkdownでBlogger記事を書いてみた</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://whatismarkdown.com/workspace/img/logo.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;196&quot; src=&quot;http://whatismarkdown.com/workspace/img/logo.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
最近、&lt;a href=&quot;http://ja.wikipedia.org/wiki/Markdown&quot;&gt;Markdown&lt;/a&gt;がマイブームです。&lt;br /&gt;
githubのREADMEを書くのに使ったのが最初だったのですが、その後、masuidriveさんがMarkdown対応のオンラインメモサービス&lt;a href=&quot;https://wri.pe/&quot;&gt;wri.pe&lt;/a&gt;を開発されたりして、少しずつ気になってました。  &lt;br /&gt;
で、MarkdownでBlogger記事を書く方法を調べた所、いくつか方法がある中で、StackEditというMarkdown対応のオンラインエディタを使う方法が、自分には一番よさそうでした。&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://tizio1976.blogspot.jp/2013/11/chrome-stackedit-markdown-blogger.html&quot;&gt;Chrome アプリ StackEdit を使い Markdown で作成そして Blogger へ投稿&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
2ペイン画面で、リアルタイムでHTMLのPreviewが表示されるので、確認しながらMarkdownで書いていきます。
記事をを書いた後は、左上のアイコンをクリックしmenuから[Publish on...]-[Blogger]を選択します。(詳細は上述のブログをご参照ください) &lt;br /&gt;
実際に、StackEditで書いたblogは&lt;a href=&quot;http://nushu123.blogspot.jp/2013/11/vagrantchefsolotremaedge_16.html&quot;&gt;こちら&lt;/a&gt;です。&lt;br /&gt;
他に、Markdown関連で調べた事をいくつか。&lt;br /&gt;
&lt;br /&gt;
&lt;h1 class=&quot;wmd-title&quot; id=&quot;markdown対応のblog&quot;&gt;
Markdown対応のBlog&lt;/h1&gt;
Markdownに対応しているサイトは、&lt;a href=&quot;http://ja.wikipedia.org/wiki/Markdown#.E5.88.A9.E7.94.A8.E4.BE.8B&quot;&gt;Wikipediaの利用例&lt;/a&gt;に記載の通り、Stack OverflowやGitHubなどがあります。 &lt;br /&gt;
Blog関連で有名な所では下記ぐらいでした。もし、BloggerでMarkdownが全く使えなかったら、これらのサービスへの移行も考えていました。&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://hatenablog.com/&quot;&gt;はてなブログ&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://staff.hatenablog.com/entry/2012/09/19/153219&quot;&gt;Markdown記法に対応しました&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://draft.blogger.com/tumblr.com&quot;&gt;Tumblr&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://whats12.tumblr.com/post/8995320970/tumblr-blog-markdown&quot;&gt;tumblrを使ってBlog的なモノを書く時に便利なMarkdownという記法&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 class=&quot;wmd-title&quot; id=&quot;markdown対応のeditor&quot;&gt;
&lt;/h1&gt;
&lt;h1 class=&quot;wmd-title&quot; id=&quot;markdown対応のeditor&quot;&gt;
MarkDown対応のEditor&lt;/h1&gt;
横着してリンクの紹介になりますが、意外にたくさんあります。この中では、Kobitoを使った事があります。
今回使用した&lt;a href=&quot;https://stackedit.io/&quot;&gt;StackEdit&lt;/a&gt;は、「ブラウザエディタ」に該当しそうですが、含まれていませんね。&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.find-job.net/startup/20-markdown-editors&quot;&gt;エンジニアならトコトンこだわりたい！Markdownエディタ20選【Mac, iPhone他】&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 class=&quot;wmd-title&quot; id=&quot;まとめ&quot;&gt;
&lt;/h1&gt;
&lt;h1 class=&quot;wmd-title&quot; id=&quot;まとめ&quot;&gt;
まとめ&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;BloggerをMarkdownで書く環境が整ったことで、これからはメモを含めて全てMarkdownで書けそうです。&lt;/li&gt;
&lt;li&gt;Markdownはそのままでも読めるので、メモの記述方法として、覚えておくと便利そうです。&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/7408835624677308757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/7408835624677308757'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/11/markdownblogger.html' title='MarkdownでBlogger記事を書いてみた'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-5369044137318228750</id><published>2013-11-16T22:10:00.001+09:00</published><updated>2013-11-17T16:59:46.368+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chef"/><category scheme="http://www.blogger.com/atom/ns#" term="Trema"/><category scheme="http://www.blogger.com/atom/ns#" term="vagrant"/><title type='text'>VagrantとChefSoloでTremaEdge環境をつくる</title><content type='html'>最近、&lt;a href=&quot;http://www.amazon.co.jp/dp/B00G9QJXM0&quot;&gt;OpenFlow徹底入門&lt;/a&gt;を読んでいます。再びOpenFlowでいろいろやってみたいと感じています。 &lt;br /&gt;
この本ではOpenFlowコントローラとしてFloodlightを使用しています。今までOpenFlowコントローラは、主にTremaを勉強してきましたが、いろいろなコントローラを触りながら、OpenFlowの本質を知るのもいいなかなと思っています。 &lt;br /&gt;
ただ、そのための環境を作成するのは、(webに情報があるとは言え)やはり時間がかかります。また、local PCのリソース(主にdisk容量)を消費するので、どこかのタイミングで、ある環境を削除する判断をしなければなりません。(今までそのような経験をしてきたので、PC購入の際にはdisk容量を多めにするようにしています)&lt;br /&gt;
VagrantとChefSoloを使えば、サーバ環境をファイルで管理できる、個々の環境imageを保持する必要がなくなります。よって、diskの使用率を低減することができます。 &lt;br /&gt;
今後、検証環境を作成する際には、VagrantとChefSoloで作成し、githubで保存していきたいと思います。&lt;br /&gt;
&lt;h1 class=&quot;wmd-title&quot; id=&quot;今回やること&quot;&gt;
今回やること&lt;/h1&gt;
今回は、trema-edgeの環境を作成してみたいと思います。
trema-edgeはtremaのOpenFlow1.3版で、OpenFlow1.0はサポートしていません。今のところ、tremaとtrema-edgeは別のものです。 &lt;br /&gt;
また、tremaはRuby1.8環境で動作するのですが、Ruby1.8の開発は終了しています。それに対して、trema-edgeはRuby2.0環境で動作します。詳しくは下記。 &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/trema/trema-edge&quot;&gt;trema-edge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://trema.github.io/trema/&quot;&gt;trema&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 class=&quot;wmd-title&quot; id=&quot;設定ファイル&quot;&gt;
設定ファイル&lt;/h1&gt;
まず今回作成した設定ファイルをgithubに保存しましたので、ご参照ください。 &lt;br /&gt;
&lt;a href=&quot;https://github.com/snumano/vagrant-trema-edge&quot;&gt;github vagrant-trema-edge&lt;/a&gt;&lt;br /&gt;
&lt;h1 class=&quot;wmd-title&quot; id=&quot;設定のポイント&quot;&gt;
設定のポイント&lt;/h1&gt;
install手順はgithubのREDAMEに従っています。 &lt;br /&gt;
手順は難しくありませんが、今回は、rubyのバージョン管理にrvmを使いましたので、rvmの設定のポイントを記載します。&lt;br /&gt;
&lt;h3 class=&quot;wmd-title&quot; id=&quot;berksfileの設定&quot;&gt;
Berksfileの設定&lt;/h3&gt;
cookbookとしてrvmを登録します。rvm用のcookbookはいくつか存在しますが、今回使用したものが安定しているようでした。&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ vi Berksfile
site :opscode
cookbook &#39;apt&#39;
cookbook &#39;rvm&#39;, github: &#39;fnichol/chef-rvm&#39;
cookbook &#39;myapp&#39;, path: &#39;./site-cookbooks/myapp&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 class=&quot;wmd-title&quot; id=&quot;vagrantfileの設定&quot;&gt;
Vagrantfileの設定&lt;/h3&gt;
chef.add_recipeとして下記の2行を追加し、chef.jsonでrubyのバージョン指定と、gemsの指定を行います。&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ vi Vagrantfile
-snip-
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = [&quot;./cookbooks&quot;, &quot;./site-cookbooks&quot;]
chef.add_recipe &quot;apt&quot;
chef.add_recipe &quot;rvm::system&quot;
chef.add_recipe &quot;rvm::vagrant&quot;
chef.add_recipe &quot;myapp&quot;

chef.json = {
  &quot;rvm&quot; =&amp;gt; {
    &quot;default_ruby&quot; =&amp;gt; &quot;ruby-2.0.0&quot;,
    &quot;global_gems&quot; =&amp;gt; [
      {&quot;name&quot; =&amp;gt; &quot;bundler&quot;},
      {&quot;name&quot; =&amp;gt; &quot;rake&quot;}
    ]
  }
}
-snip-
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 class=&quot;wmd-title&quot; id=&quot;recipeの設定&quot;&gt;
Recipeの設定&lt;/h3&gt;
今回、cookbookでrvmをinstallしているので、rvm_shellリソースが使えるようになっています。rvm_shellでrvmに依存する部分の記載を行います。 &lt;br /&gt;
また、githubからtrema-edgeのrepositoryを取得するのはgitリソースを使用します。  &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;$ vi site-cookbooks/myapp/recipes/default.rb
git &quot;/home/vagrant/trema-edge&quot; do
  repository &quot;git://github.com/trema/trema-edge.git&quot;
  reference &quot;master&quot;
  action :checkout
  user &quot;vagrant&quot;
  group &quot;vagrant&quot;
end

rvm_shell &quot;install trema-edge&quot; do
  ruby_string &#39;ruby-2.0.0&#39;
  cwd &quot;/home/vagrant/trema-edge&quot;
  code &amp;lt;&amp;lt;-EOC
    bundle install
    rake
  EOC
end

bash &quot;.bashrc&quot; do
  not_if &quot;which trema&quot;
  code &amp;lt;&amp;lt;-EOC
    echo &#39;PATH=&quot;$HOME/trema-edge/bin:$PATH&quot;&#39; &amp;gt;&amp;gt; /home/vagrant/.bashrc
  EOC
end
&lt;/code&gt;&lt;/pre&gt;
&lt;h1 class=&quot;wmd-title&quot; id=&quot;まとめ&quot;&gt;
まとめ&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;今回、trema-edgeの環境設定をVagrantとChefSoloで行いました。&lt;/li&gt;
&lt;li&gt;設定のポイントとしては、今回はrvmを使用し、ruby2.0.0を指定しています。&lt;/li&gt;
&lt;li&gt;trema-edge自体は、これから触ってみたいと思います。&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=snumano-22&amp;amp;o=9&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=4798131776&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;npa=1&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;

&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=snumano-22&amp;amp;o=9&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=4774154652&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;npa=1&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;

&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=snumano-22&amp;amp;o=9&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B00BSPH158&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;npa=1&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;

&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/5369044137318228750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/5369044137318228750'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/11/vagrantchefsolotremaedge_16.html' title='VagrantとChefSoloでTremaEdge環境をつくる'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-6425402628418115592</id><published>2013-09-19T09:28:00.001+09:00</published><updated>2013-09-19T09:28:02.437+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="まとめ"/><category scheme="http://www.blogger.com/atom/ns#" term="学習"/><title type='text'>情報収集あれこれ</title><content type='html'>以前、&lt;a href=&quot;http://nushu123.blogspot.jp/2012/06/blog-post.html&quot; target=&quot;_blank&quot;&gt;勉強会についてまとめ&lt;/a&gt;ましたが、今回は情報収集について。&lt;br /&gt;
「キュレーション」をキーワードに、実際に使っているものを紹介します。&lt;br /&gt;
&lt;h2&gt;
キュレーションツール 海外&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Zite:iPhoneアプリ&lt;br /&gt;&lt;a href=&quot;http://www.zite.com/&quot;&gt;http://www.zite.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Prismatic:iPhoneアプリ&lt;br /&gt;&lt;a href=&quot;http://getprismatic.com/&quot;&gt;http://getprismatic.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Hacker News&lt;br /&gt;キュレーションとは違うが、Ycombinatorが運営しているサイト。Startup系の情報あり。&lt;br /&gt;&lt;a href=&quot;https://news.ycombinator.com/&quot;&gt;https://news.ycombinator.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
キュレーションツール 日本&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;vingow&lt;br /&gt;&lt;a href=&quot;https://vingow.com/&quot;&gt;https://vingow.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Gunosy&lt;br /&gt;&lt;a href=&quot;http://gunosy.com/&quot;&gt;http://gunosy.com/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
まとめ&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;出勤の電車の中で、日経電子版を読んだ後に、上記のものをZIteから順にチェックしています。時間がない時はZiteのhomeと、Hacker Newsだけでもみるようにしています。&lt;/li&gt;
&lt;li&gt;最近は、Knoh,newsHUB,SmartNewsなどのnews系のアプリも増えており、試しているところです。&lt;/li&gt;
&lt;li&gt;しかし、結局はFBで他の方が紹介している記事が、かなり参考になっています。専門的なもの、少し自分の専門とは違うが非常に参考になるもの、海外情報などです。&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/6425402628418115592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/6425402628418115592'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/09/blog-post.html' title='情報収集あれこれ'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-1302814511426771409</id><published>2013-09-16T16:04:00.002+09:00</published><updated>2013-09-16T16:17:08.376+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="vagrant"/><title type='text'>vagrant synced folder設定変更中、動作がおかしくなった場合の対処方法</title><content type='html'>&lt;a href=&quot;http://docs.vagrantup.com/v2/synced-folders/nfs.html&quot; target=&quot;_blank&quot;&gt;synced folder(nfs有効)&lt;/a&gt;の設定において、synced元のfolder(directory)を変更時に動作がおかしくなったので、備忘録として記載する。


&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
環境&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;OS&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;OSX ver 10.8.4&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;vagrant環境&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;vagrant ver1.3.1&lt;/li&gt;
&lt;li&gt;vagrant-berkshelf ver1.3.3&lt;/li&gt;
&lt;li&gt;berkshelf ver2.0.10&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2&gt;
事象&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;当初、適当なdirectory(foo/bar)を、vagrantの仮想環境の/vagrant_dataにnfs mount実施していた。&lt;/li&gt;
&lt;li&gt;設定を見直し、Vagrantfileが存在するcurrent directoryを、synced folderのdefaultである/vagrantにnfs mountするよう設定変更した。&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;変更前&lt;br /&gt;
&lt;pre&gt;config.vm.synced_folder &quot;foo/bar&quot;, &quot;/vagrant_data&quot;, :nfs =&amp;gt; true
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul&gt;&lt;ul&gt;
&lt;li&gt;変更後&lt;br /&gt;
&lt;pre&gt;config.vm.synced_folder &quot;.&quot;, &quot;/vagrant&quot;, :nfs =&amp;gt; true&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;その後、vagrant upを実施すると、下記エラーが発生するようになった。vagrant sshも実施不可。&lt;br /&gt;
&lt;pre&gt;$ vagrant up
Bringing machine &#39;default&#39; up with &#39;virtualbox&#39; provider...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[Berkshelf] Updating Vagrant&#39;s berkshelf: &#39;/Users/snumano/.berkshelf/default/vagrant/berkshelf-20130914-3068-18zoh8f-default&#39;
[Berkshelf] Using apt (1.9.0)
[Berkshelf] Using imagemagick (0.2.2)
[Berkshelf] Installing rvm (0.9.1) from git: &#39;git://github.com/fnichol/chef-rvm.git&#39; with branch: &#39;master&#39; at ref: &#39;7038fb8c518d0d7785767de215b1ae463f237973&#39;
[Berkshelf] Using myapp (0.1.0) at &#39;./chef/site-cookbooks/myapp&#39;
[Berkshelf] Using java (1.13.0)
[Berkshelf] Using windows (1.10.0)
[Berkshelf] Using chef_handler (1.1.4)
[Berkshelf] Using chef_gem (0.1.0)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 =&amp;gt; 2222 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[default] Exporting NFS shared folders...
Preparing to edit /etc/exports. Administrator privileges will be required...
Password:
[default] Mounting NFS shared folders...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mount -o vers=3 192.168.33.1:&#39;/Users/snumano/Documents/hoge&#39; /vagrant&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2&gt;
対処方法&lt;/h2&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.1x1.jp/blog/2013/08/vagrant_synced_folder_with_nfs.html&quot; target=&quot;_blank&quot;&gt;こちら&lt;/a&gt;を参考に、/etc/exportsを手動削除し、nfsdのdisable,enableを実施。&lt;/div&gt;
&lt;div&gt;
その後、正常にvagrant up起動およびnfs mountを確認できました。&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
$ sudo rm /etc/exports&lt;br /&gt;
$ sudo nfsd disable&lt;br /&gt;
$ sudo nfsd enable&lt;br /&gt;
$ sudo nfsd status&lt;br /&gt;
$ vagrant up&lt;/blockquote&gt;
&lt;h2&gt;
まとめ&amp;nbsp;&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;今回事象の原因不明だが、synced folder変更中に、local pc側nfsdもしくはrouting tableがおかしくなったような印象。&lt;/li&gt;
&lt;li&gt;もしかしたら、local PCに依存する問題かもしれない。&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/1302814511426771409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/1302814511426771409'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/09/vagrant-synced-folder.html' title='vagrant synced folder設定変更中、動作がおかしくなった場合の対処方法'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-214909560521233468</id><published>2013-07-28T12:29:00.001+09:00</published><updated>2013-07-28T12:32:40.471+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="unicorn"/><category scheme="http://www.blogger.com/atom/ns#" term="vagrant"/><title type='text'>Nginx+unicornでRailsを動かす</title><content type='html'>&lt;textarea border-style:dotted=&quot;border-style:dotted&quot; class=&quot;markdown&quot; disabled=&quot;disabled&quot; style=&quot;height: 385px; margin: 2px; width: 699px;&quot;&gt;表題の件で苦戦したので忘備録として残します。

[こちらの図](http://semind.github.io/blog/2012/01/19/nginx-plus-unicornderails3-dot-1gadong-zuo-suruhuan-jing-wozuo-ru/) のように、Nginxでは静的コンテンツ、unicornにて動的コンテンツ(Rails)を扱う構成を想定します。 
今回は、仮想環境を最初に作成する時だけvagrantを使用し、以降の作業は仮想環境の中で手動設定を行います。

# VagrantでUbuntu環境を用意

&lt;pre&gt;
$ mkdir UbuntuTest
$ cd UbuntuTest
$ vagrant box add precise64 http://files.vagrantup.com/precise64.box
$ vagrant box list
$ vagrant init precise64
$ vi Vagrantfile
  #とりあえず下記2行をコメントインします。
  config.vm.network :private_network, ip: &quot;192.168.33.10&quot;
  config.vm.synced_folder &quot;./data&quot;, &quot;/vagrant_data&quot;          #dirは適当なものに変更
$ mkdir data
$ ls -p
Vagrantfile data/
$ vagrant up
&lt;/pre&gt;
# 仮想環境に接続
以降の作業は仮想環境で行います。
&lt;pre&gt;
$ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)

 * Documentation:  https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:23:18 2012 from 10.0.2.2
vagrant@precise64:~$ 
&lt;/pre&gt;
# curlをinstall
&lt;pre&gt;
vagrant@precise64:~$ sudo apt-get install curl
&lt;/pre&gt;
# RVMをinstallし、 ruby1.9.3をinstall
defaultだとruby1.8.7なので。
&lt;pre&gt;
vagrant@precise64:~$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
vagrant@precise64:~$ curl -L get.rvm.io | bash -s stable
vagrant@precise64:~$ echo &#39;[[ -s &quot;$HOME/.rvm/scripts/rvm&quot; ]] &amp;&amp; . &quot;$HOME/.rvm/scripts/rvm&quot; # Load RVM function&#39; &gt;&gt; ~/.bash_profile
vagrant@precise64:~$ source ~/.bash_profile
vagrant@precise64:~$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-p374]
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p320]
[ruby-]1.9.3[-p448]
[ruby-]2.0.0-p195
[ruby-]2.0.0[-p247]
[ruby-]2.0.0-head
ruby-head
-snip-
vagrant@precise64:~$ rvm install 1.9.3
vagrant@precise64:~$ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]
&lt;/pre&gt;
# Rails 3.2.xをinstall
version指定しないとRails4.0がinstallされる。今はまだRails3.2系の環境を想定しているので。
&lt;pre&gt;
vagrant@precise64:~$ gem install rails --version &quot;~&gt;3.2.0&quot; --no-ri --no-rdoc 
Successfully installed rails-3.2.14
1 gem installed
vagrant@precise64:~$ rails -v
Rails 3.2.14
&lt;/pre&gt;
# Rails環境作成
&lt;pre&gt;
vagrant@precise64:~$ cd /vagrant_data/
vagrant@precise64:/vagrant_data$ ls
vagrant@precise64:/vagrant_data$ rails new unicorntest
vagrant@precise64:/vagrant_data$ cd unicorntest/
vagrant@precise64:/vagrant_data/unicorntest$ ls
app  config  config.ru  db  doc  Gemfile  Gemfile.lock  lib  log  public  Rakefile  README.rdoc  script  test  tmp  vendor
vagrant@precise64:/vagrant_data/unicorntest$ bunlde install
&lt;/pre&gt;
# unicornをinstall &amp; unicorn動作確認
&lt;pre&gt;
vagrant@precise64:/vagrant_data/unicorntest$ vi Gemfile
  gem &#39;unicorn&#39;            # コメントイン
  gem &#39;execjs&#39;              #後述のunicorn_rails起動時のエラーになるので、事前に登録
  gem &#39;therubyracer&#39;    #同上
vagrant@precise64:/vagrant_data/unicorntest$ bunlde install
vagrant@precise64:/vagrant_data/unicorntest$ unicorn_rails
I, [2013-07-28T01:42:48.129123 #7134]  INFO -- : listening on addr=0.0.0.0:8080 fd=7
I, [2013-07-28T01:42:48.129303 #7134]  INFO -- : worker=0 spawning...
I, [2013-07-28T01:42:48.130433 #7134]  INFO -- : master process ready
I, [2013-07-28T01:42:48.131054 #7136]  INFO -- : worker=0 spawned pid=7136
I, [2013-07-28T01:42:48.131251 #7136]  INFO -- : Refreshing Gem list
I, [2013-07-28T01:42:50.247690 #7136]  INFO -- : worker=0 ready
&lt;/pre&gt;
&lt;/textarea&gt;

&lt;br /&gt;
local PCのブラウザから「http://192.168.33.10:8080」を指定。すると、下記のように表示されます。
動作確認後、一旦「Ctl + c」でunicorn_railsを停止します。
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib7p78hF99NG8nLECrnKVTa-uINQCqGZwIHfnOv8oNtZvNCu6xf9pV3s4T0DbK7xYwD_Xv19lHsOkpeoiPUVKpnNLP0vSRTp6oyA1K7_UQnMKH_-eEuLZQTWt_XNrBbS4nYJSieR-TF6FM/s1600/unicorn_sample.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;246&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib7p78hF99NG8nLECrnKVTa-uINQCqGZwIHfnOv8oNtZvNCu6xf9pV3s4T0DbK7xYwD_Xv19lHsOkpeoiPUVKpnNLP0vSRTp6oyA1K7_UQnMKH_-eEuLZQTWt_XNrBbS4nYJSieR-TF6FM/s400/unicorn_sample.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style=&quot;clear: both;&quot;&gt;
&lt;textarea border-style:dotted=&quot;border-style:dotted&quot; class=&quot;markdown&quot; disabled=&quot;disabled&quot; style=&quot;height: 385px; margin: 2px; width: 699px;&quot;&gt;

# unicorn設定
[こちら](http://unicorn.bogomips.org/examples/unicorn.conf.rb)を参考に、railsのproject内のconfig/unicorn.rbを作成します。
下記コメントしている部分を変更したぐらいです。
&lt;pre&gt;
vagrant@precise64:/vagrant_data/unicorntest$ vi config/unicorn.rb
worker_processes 2

listen &quot;/tmp/unicorn.sock&quot;, :backlog =&gt; 64    # 後述のnginxの設定と合わせる！
listen 8088, :tcp_nopush =&gt; true

timeout 30

pid &quot;/tmp/unicorn.pid&quot;

stderr_path &quot;/vagrant_data/unicorntest/log/unicorn.stderr.log&quot;    # 自分の環境にあわせて。
stdout_path &quot;/vagrant_data/unicorntest/log/unicorn.stdout.log&quot; # 自分の環境にあわせて。

preload_app true
GC.respond_to?(:copy_on_write_friendly=) and
  GC.copy_on_write_friendly = true

check_client_connection false

before_fork do |server, worker|
  defined?(ActiveRecord::Base) and
    ActiveRecord::Base.connection.disconnect!
end

after_fork do |server, worker|
  defined?(ActiveRecord::Base) and
    ActiveRecord::Base.establish_connection
end
&lt;/pre&gt;
設定ファイルを指定して、unicornをdaemonとして起動。
&lt;pre&gt;
vagrant@precise64:/vagrant_data/unicorntest$ unicorn_rails -c config/unicorn.rb -D 
&lt;/pre&gt;

# nginxをinstall
&lt;pre&gt;
vagrant@precise64:/vagrant_data/unicorntest$ cd
vagrant@precise64:~$ sudo apt-get install nginx
vagrant@precise64:~$ nginx -v
nginx version: nginx/1.1.19
&lt;/pre&gt;

# nginxの設定準備
今回は、シンプルに/etc/nginx/sites-available/defaultを変更しました。
&lt;pre&gt;
vagrant@precise64:~$ ls /etc/nginx/sites-available/
default
vagrant@precise64:~$ sudo vi /etc/nginx/sites-available/default 
#下記を追加
upstream uniconrtest {
  server unix:/tmp/unicorn.sock;  #unicornの設定で行ったのと同じpathを設定
}
#下記rootを変更
server {
-snip-
        root /vagrant_data/unicorntest/public;
-snip-
&lt;/pre&gt;

# nginxを再起動
&lt;pre&gt;
vagrant@precise64:~$ sudo /etc/init.d/nginx restart
Restarting nginx: nginx.
vagrant@precise64:~$ 
&lt;/pre&gt;

local PCのブラウザから「http://192.168.33.10」を指定。すると、下記のように表示されます。
&lt;/textarea&gt;&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDleDx91MF7Q3ESmJShpOxcm3IlHCtK9Xfnx2kloLrla4E3vHyA-qzgyKcicU6yG87aLPIVK8y_tFIIjjvFUtqpNTq2U1auK7s03BbpVffc9gjxyMNKF6XjhQCSmr4KtmR98C4wsA2qZZA/s1600/unicornexsample.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDleDx91MF7Q3ESmJShpOxcm3IlHCtK9Xfnx2kloLrla4E3vHyA-qzgyKcicU6yG87aLPIVK8y_tFIIjjvFUtqpNTq2U1auK7s03BbpVffc9gjxyMNKF6XjhQCSmr4KtmR98C4wsA2qZZA/s400/unicornexsample.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style=&quot;clear: both;&quot;&gt;
&lt;textarea border-style:dotted=&quot;border-style:dotted&quot; class=&quot;markdown&quot; disabled=&quot;disabled&quot; style=&quot;height: 385px; margin: 2px; width: 699px;&quot;&gt;

# rails assetsのprecomile
上述の画像をみると、Railsのdefault pageにpng画像が表示されていません。
Railsのasset pipelineという仕組みが関係しているようです。
今回は事前に下記コマンドを実行することで、Railsプロジェクト内のpublic/assets/以下にpng fileを生成しておきます。
&lt;pre&gt;
vagrant@precise64:~$ cd /vagrant_data/unicorntest/
vagrant@precise64:/vagrant_data/unicorntest$ ls
app  config  config.ru  db  doc  Gemfile  Gemfile.lock  lib  log  public  Rakefile  README.rdoc  script  test  tmp  vendor
vagrant@precise64:/vagrant_data/unicorntest$ rake assets:precompile
/home/vagrant/.rvm/rubies/ruby-1.9.3-p448/bin/ruby /home/vagrant/.rvm/gems/ruby-1.9.3-p448@global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
vagrant@precise64:/vagrant_data/unicorntest$ ls
app  config  config.ru  db  doc  Gemfile  Gemfile.lock  lib  log  public  Rakefile  README.rdoc  script  test  tmp  vendor
vagrant@precise64:/vagrant_data/unicorntest$ cd public/
vagrant@precise64:/vagrant_data/unicorntest/public$ ls
404.html  422.html  500.html  assets  favicon.ico  index.html  robots.txt
vagrant@precise64:/vagrant_data/unicorntest/public$ cd assets/
vagrant@precise64:/vagrant_data/unicorntest/public/assets$ ls
application-00e0de334aededf0deeb8a28335a997e.js      application.js.gz
application-00e0de334aededf0deeb8a28335a997e.js.gz   jquery.min-6336c5bca4c709e809647cdfcb484d0a.map
application-1b13569e9620782f423d4cd3ce931750.css     jquery.min.map
application-1b13569e9620782f423d4cd3ce931750.css.gz  manifest.yml
application.css                                      rails-a3386665c05a2d82f711a4aaa72d247c.png
application.css.gz                                   rails.png
application.js
&lt;/pre&gt;
再度、local PCからアクセスするとpng画像が表示されるようになりました。
&lt;/textarea&gt;&lt;/div&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyHNVuFvUWO0slK_OyEwgRyZi2a4N9mhZWtZ33gNrnLV6ay75olopVtrUjMk-MrSQ1J6WjdtwmFZkkFoC3OsUvRTx_w0sJu7ffjpsWmEduDltD0AZxtPOloZ1-9L-1lo0pxY98NgaecLnK/s1600/unicorn_exsample2.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyHNVuFvUWO0slK_OyEwgRyZi2a4N9mhZWtZ33gNrnLV6ay75olopVtrUjMk-MrSQ1J6WjdtwmFZkkFoC3OsUvRTx_w0sJu7ffjpsWmEduDltD0AZxtPOloZ1-9L-1lo0pxY98NgaecLnK/s400/unicorn_exsample2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;div style=&quot;clear: both;&quot;&gt;
&lt;textarea border-style:dotted=&quot;border-style:dotted&quot; class=&quot;markdown&quot; disabled=&quot;disabled&quot; style=&quot;height: 385px; margin: 2px; width: 699px;&quot;&gt;

# まとめ
* 今回初めて、Nginx + Railsの環境を作成しました。動的コンテンツを扱う場合、railsではunicornを使うのが一般的なようですが、汎用的な設定を探すのに時間がかかりました。
* 今回は動的コンテンツとしてRailsを用意しましたが、実際にはinit時のdefaultの静的コンテンツです。実際の動的コンテンツでの動作についても引き続き確認します。
* 最終的には、vagrant upコマンド一発で、これらの「Nginx+unicorn+Railsの環境」が自動構築されるようにしたいと思います。

# 参考
[dotinstall Vagrant](http://dotinstall.com/lessons/basic_vagrant)  
[Nginx + unicornでrails3.1が動作する環境を作る](http://semind.github.io/blog/2012/01/19/nginx-plus-unicornderails3-dot-1gadong-zuo-suruhuan-jing-wozuo-ru/)  
[nginx + Unicorn を試してみた](http://d.hatena.ne.jp/milk1000cc/20100804/1280893810)  
[ubuntuでnginx + unicorn - 設定編](http://prototype-beta.com/server/entry/12_ubuntu%E3%81%A7nginx_+_unicorn_-_%E8%A8%AD%E5%AE%9A%E7%B7%A8)
[5分でわかる!? アセットパイプライン（Assets Pipeline）](http://rails.hatenadiary.jp/entry/2013/03/03/125801)
&lt;/textarea&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/214909560521233468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/214909560521233468'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/07/nginxunicornrails.html' title='Nginx+unicornでRailsを動かす'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEib7p78hF99NG8nLECrnKVTa-uINQCqGZwIHfnOv8oNtZvNCu6xf9pV3s4T0DbK7xYwD_Xv19lHsOkpeoiPUVKpnNLP0vSRTp6oyA1K7_UQnMKH_-eEuLZQTWt_XNrBbS4nYJSieR-TF6FM/s72-c/unicorn_sample.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-2443315613851971519</id><published>2013-07-25T07:14:00.003+09:00</published><updated>2013-07-25T22:18:15.459+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Berkshelf"/><category scheme="http://www.blogger.com/atom/ns#" term="chef"/><category scheme="http://www.blogger.com/atom/ns#" term="vagrant"/><title type='text'>vagrant + chef solo + Berkshelf環境で、opscode-cookbookと自作cookを混在させたらハマった。その対応</title><content type='html'>&lt;a href=&quot;http://nushu123.blogspot.jp/2013/07/vagrant-chef-soloopscode-cookbookcook.html&quot; target=&quot;_blank&quot;&gt;前回のblog&lt;/a&gt;で、berks cookbookコマンドを用いたrepository作成の手順を紹介しました。&lt;br /&gt;
ただし、berks cookbookコマンドで作成したrepositoryはcookbookそのものでもあり、defaultの設定・環境だと、サードパーティのcookbook利用する場合、ファイル構成が分かりにくいものとなってしまいます。&lt;br /&gt;
&lt;br /&gt;
そこで、前回ハマった「knife solo init」コマンドで作成したrepositoryにVagrantfileを用意し、サードパーティー(&lt;a href=&quot;https://github.com/opscode-cookbooks&quot; target=&quot;_blank&quot;&gt;opscode-cookbooks&lt;/a&gt;)と自作cookbookを混在させる方法について再度見直しを行い、正常動作できるようにしたいと思います。&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
対応方法&lt;/h2&gt;
先に結論を書くと、Berksfileに自作cookbookをpathで明示的に指定してあげました。こうすることで、opscodeのcookbookはネットからDL(git clone?)されるのに対して、自作cookbookはlocalの指定されたpathのdirを参照し、適切に動作するようになりました。&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;pochi-2:chef-repo snumano$ cat Berksfile
site :opscode

cookbook &#39;apt&#39;, &#39;= 1.9.0&#39;
cookbook &#39;mysql&#39;
cookbook &#39;nginx&#39;
cookbook &#39;database&#39;
cookbook &#39;myapp&#39;, path: &#39;./site-cookbooks/myapp&#39;    #追加行
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
コードはこちら&lt;/h2&gt;
&lt;a href=&quot;https://github.com/snumano/vagrant-knifesolo2&quot; target=&quot;_blank&quot;&gt;https://github.com/snumano/vagrant-knifesolo2&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
参考&lt;/h2&gt;
&lt;a href=&quot;http://berkshelf.com/&quot;&gt;http://berkshelf.com/&lt;/a&gt;&lt;br /&gt;
入門Chef Solo&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=snumano-22&amp;amp;o=9&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B00BSPH158&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;npa=1&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
まとめ&lt;/h2&gt;
今回でやっと、Vagrant&amp;nbsp;+ Chef Solo + Berkshelfの対応手順が整理できました。&lt;br /&gt;
「こっちのやり方の方がいいよ」など情報ありましたら、お知らせいただけたら幸いです。</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/2443315613851971519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/2443315613851971519'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/07/vagrant-chef-soloopscode-cookbookcook-2.html' title='vagrant + chef solo + Berkshelf環境で、opscode-cookbookと自作cookを混在させたらハマった。その対応'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-4449004598555468893</id><published>2013-07-23T01:09:00.000+09:00</published><updated>2013-07-23T07:13:52.716+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chef"/><category scheme="http://www.blogger.com/atom/ns#" term="vagrant"/><title type='text'>vagrant + chef solo環境で、opscode-cookbookと自作cookを混在させたらハマった</title><content type='html'>表題の通りハマったので忘備録として残しておきます。&lt;br /&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
事象&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;knife solo initコマンドでrepositoryを作成後、opscode-cookbookからnginx,mysql,databaseなどのcookbookをberkshelfコマンドでinstall。&lt;/li&gt;
&lt;li&gt;また、自作cookbookをknife cookbook createコマンドで作成。&lt;/li&gt;
&lt;li&gt;自作cookbookのrecipeを書いた後、vagrant upすると、自作cookbookが見つからない旨のerrorが発生。&lt;/li&gt;
&lt;li&gt;error内容を確認すると、vagrant up時に、brrkshelfコマンドが実行され、Berksfileに記載されたcookbooksが~/.berkshelf/default/vagrant/berkshelf-***-default以下に作成され、chef soloコマンドにて仮想環境に転送されるよう。しかし、このberkshelf-***-default以下に、自作cookbookは作成されず、結果errorとなっている模様。&lt;/li&gt;
&lt;li&gt;ちなみに、下記のopscode-cookbookのchef-repoをcloneした場合も、knife solo initの場合と同様に、errorになることを確認した。&lt;/li&gt;
&lt;pre&gt;git clone https://github.com/opscode/chef-repo.git
&lt;/pre&gt;
&lt;/ul&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
コード&lt;/h2&gt;
&lt;div&gt;
&lt;a href=&quot;https://github.com/snumano/vagrant-knifesolo&quot;&gt;https://github.com/snumano/vagrant-knifesolo&lt;/a&gt;&lt;/div&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
原因&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;不明&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;h2&gt;
対応&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Berkfsfileを_Berksfileにrename後、vagrant up実行すると正常に処理完了した。&lt;br /&gt;berkshelfコマンドの実行を抑制する事で、上述の事象は発生しなくなった。&lt;br /&gt;しかし、利用はよくわからない。&lt;/li&gt;
&lt;li&gt;このままだと気持ち悪いので、Berkshelfコマンドを用いたrepository作成を試したところ、vagrant upの正常実行を確認できた。&lt;br /&gt;&lt;a href=&quot;https://github.com/snumano/vagrant-berkshelf&quot;&gt;https://github.com/snumano/vagrant-berkshelf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
まとめ&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Berkshelfコマンドでrepository作成した場合、knife solo initした場合と比較して、ファイル構成とVagrantfileの設定内容が異なる事は確認できたが、どの部分が今回の動作の違いになっているのかは、今のところ不明。&lt;/li&gt;
&lt;li&gt;本事象の原因と根本対策について、どなたか教えていただけたら幸いです。&lt;br /&gt;&lt;b&gt;(2013/7/23追記：Berksfileに自作cookbookをpath optionとともに追記することで、本事象を回避できることを確認しました。後日blogにまとめます)&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;berks cookbokコマンドは、cookbook = repositoryとして扱うようです。上述のサンプルコードでは、repository名であるchef-repoがそのままcookbook名になっているので、少しかっこ悪い。。。&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
最後に、入門Chef Soloは何回も読み返して参考にさせていただきました。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm-fe.amazon-adsystem.com/e/cm?t=snumano-22&amp;amp;o=9&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=B00BSPH158&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;npa=1&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4449004598555468893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4449004598555468893'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/07/vagrant-chef-soloopscode-cookbookcook.html' title='vagrant + chef solo環境で、opscode-cookbookと自作cookを混在させたらハマった'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-4588555925132945398</id><published>2013-07-18T07:14:00.003+09:00</published><updated>2013-07-25T22:25:10.531+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chef"/><category scheme="http://www.blogger.com/atom/ns#" term="nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="vagrant"/><title type='text'>vagrant + knife soloでnginxをinstallしてみる</title><content type='html'>備忘録としてまとめます。&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
local環境&lt;/h2&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;MacOSX 10.8.4&lt;/li&gt;
&lt;li&gt;ruby 1.9.3p327&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2&gt;
作成する仮想環境&lt;/h2&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Ubuntu 12.04&lt;/li&gt;
&lt;li&gt;Nginx&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2&gt;
手順&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;chef-soloをinstall&lt;/li&gt;
&lt;pre&gt;$ gem install chef
$ knife -v
Chef: 11.4.4
&lt;/pre&gt;
&lt;li&gt;knife-soloをinstall。最新のver0.3.0をinstallするため、githubからcloneします。&lt;br /&gt;
&lt;pre&gt;$ git clone git@github.com:matschaffer/knife-solo.git
$ cd knife-solo
$ bundle
$ bundle exec rake install&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Virual Boxをinstall&lt;br /&gt;&lt;a href=&quot;https://www.virtualbox.org/wiki/Downloads&quot; target=&quot;_blank&quot;&gt;こちら&lt;/a&gt;からDownLoad&lt;/li&gt;
&lt;li&gt;vagrantをinstall&lt;/li&gt;
&lt;pre&gt;$ gem install vagrant
&lt;/pre&gt;
&lt;li&gt;vagrant環境を作成&lt;br /&gt;&lt;a href=&quot;http://www.vagrantbox.es/&quot;&gt;vagrantbox.es&lt;/a&gt;から使いたいboxを選ぶ&lt;br /&gt;
&lt;pre&gt;$ vagrant box add ubuntu12_04 http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-amd64-disk1.box
$ vagrant box list
$ mkdir Ubuntu
$ cd Ubuntu
$ vagrant init ubuntu12_04
$ vagrant up
&lt;/pre&gt;
下記で仮想環境にアクセスできる&lt;br /&gt;
&lt;pre&gt;$ vagrant ssh
&lt;/pre&gt;
knife soloでsshアクセスできるように下記を実施。host名はdev1とする。&lt;br /&gt;
&lt;pre&gt;$ vagrant ssh-config --host dev1 &amp;gt;&amp;gt; ~/.ssh/config
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;仮想環境にknife soloをinstall&lt;br /&gt;
&lt;pre&gt;$ knife solo prepare dev1
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;cookbookレポジトリを作成。&lt;br /&gt;とりあえず、上述のVagrantのdirに一緒に作成しておきます。&lt;br /&gt;
&lt;pre&gt;$ knife solo init chef-repo
$ cd chef-repo
$ git init
$ git add .
$ git commit -m &#39;init&#39;
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;仮想環境にinstallするレシピを書く
&lt;pre&gt;$knife cookbook create nginx -o site-cookbooks
$vi site-cookbooks/nginx/recipes/default.rb
package &#39;nginx&#39; do
&amp;nbsp; action :install
end

service &quot;nginx&quot; do
&amp;nbsp; supports :status =&amp;gt; true, :restart =&amp;gt; true, :reload =&amp;gt; true
&amp;nbsp; action [ :enable, :start ]
end
&lt;/pre&gt;
&lt;pre&gt;$ vi nodes/dev1.json
{
&amp;nbsp; &quot;run_list&quot;:[
&amp;nbsp; &amp;nbsp; &quot;nginx&quot;
&amp;nbsp; ]
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;仮想環境にレシピを適用&lt;br /&gt;
&lt;pre&gt;$ knife solo cook dev1
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;仮想環境側で確認&lt;br /&gt;nginxのバージョンが最新にならない。。。srcからinstallしようかな。。。&lt;br /&gt;
&lt;pre&gt;$ nginx -v
nginx version: nginx/1.1.19
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;動作確認したら、recipeをcommit&lt;br /&gt;
&lt;pre&gt;$ git add ./site-cookbooks/nginx/
$ git commit -m &#39;add nginx recipe&#39;
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
参考：&lt;br /&gt;
入門Chef Solo&lt;br /&gt;
http://docs.komagata.org/5098</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4588555925132945398'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4588555925132945398'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/07/vagrant-knife-solonginxinstall.html' title='vagrant + knife soloでnginxをinstallしてみる'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-4645842835960512586</id><published>2013-07-15T21:17:00.001+09:00</published><updated>2013-07-15T21:17:58.365+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>「プログラミング入門　- Rubyを使って -」をやってみた　その1</title><content type='html'>Rubyの勉強に下記サイトの練習問題に挑戦します。1章はirbを使ってます。&lt;br /&gt;
&lt;a href=&quot;http://www.ie.u-ryukyu.ac.jp/~kono/software/s04/tutorial/&quot; target=&quot;_blank&quot;&gt;プログラミング入門 - Rubyを使って -, by Chris Pine, 日本語ver. by S. Nishiyama&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
1.数(Numaber)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;1年は何時間でしょうか？&lt;br /&gt;うるう年ではないとします。&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;gt;&amp;gt; 24*365&lt;br /&gt;
=&amp;gt; 8760
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;10年間は何分でしょうか？&lt;br /&gt;うるう年が2回ありますので、計算に含めます。&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;gt;&amp;gt; 60*24*(365*10+10/4)&lt;br /&gt;
=&amp;gt; 5258880
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;あなたが生まれてから今日まで何秒たっているでしょうか?&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;gt;&amp;gt; (Time.now - Time.local(1973,12,3,0,0,0)).to_i&lt;br /&gt;
=&amp;gt; 1250124789
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;あなたは一生のうちいくつのチョコレートを食べたいですか?&lt;br /&gt;1週間に1つのチョコを食べるとします。&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;gt;&amp;gt; (80*365)/7&lt;br /&gt;
=&amp;gt; 4171
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;私が生まれてから10億3400万秒 たっているとしたら、私は今何歳でしょう&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;gt;&amp;gt; 1034000000/(60*60*24*365)&lt;br /&gt;
=&amp;gt; 32&lt;/blockquote&gt;
&lt;h2&gt;
4.数と文字列の変換&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;最初に姓、次に名前を聞いて、最後にフルネームに対してあいさつを するようなプログラムを書いてみましょう。&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;pochi-2:Test snumano$ cat 4-1.rb
#!/usr/bin/ruby

puts &#39;こんにちは。あなたの姓を入力してください&#39;
last = gets.chomp

puts &#39;次は、あなたの名を入力してください&#39;
first = gets.chomp

puts &#39;あなたの名前は&#39; + first + &#39; &#39; + last + &#39;ですね。&#39;

pochi-2:Test snumano$ ./4-1.rb
こんにちは。あなたの姓を入力してください
Numano
次は、あなたの名を入力してください
Shugo
あなたの名前はShugo Numanoですね。
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;好きな数を入力してもらい、それに1を加えて、その結果を ベターな 数字として薦めるプログラムを書きましょう。&lt;/li&gt;
&amp;nbsp;&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;pochi-2:Test snumano$ cat 4-1.rb
#!/usr/bin/ruby

puts &#39;こんにちは。あなたの姓を入力してください&#39;
last = gets.chomp

puts &#39;次は、あなたの名を入力してください&#39;
first = gets.chomp

puts &#39;あなたの名前は&#39; + first + &#39; &#39; + last + &#39;ですね。&#39;

pochi-2:Test snumano$ ./4-1.rb
こんにちは。あなたの姓を入力してください
Numano
次は、あなたの名を入力してください
Shugo
あなたの名前はShugo Numanoですね。&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;h2&gt;
5.メソッド(method)&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 16px; line-height: 23px;&quot;&gt;「怒ったボス」のプログラム&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;pochi-2:Test snumano$ cat 5-1.rb
#!/usr/bin/ruby

$KCODE = &#39;UTF-8&#39;

puts &#39;望みは何だ？&#39;
hope = gets.chomp

if hope =~ /給料上げてください/ then
  puts &#39;なにぃ? &quot;給料上げてください&quot; だとー!! おまえは首だ!! &#39;
else
  puts &#39;なにぃ？&#39; + hope + &#39;だとー!!お前は首だ!!&#39;
end
pochi-2:Test snumano$ ./5-1.rb
望みは何だ？
休みたい
なにぃ？休みたいだとー!!お前は首だ!!
pochi-2:Test snumano$ ./5-1.rb
望みは何だ？
給料上げてください
なにぃ? &quot;給料上げてください&quot; だとー!! おまえは首だ!! 
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;background-color: white; font-family: verdana, sans-serif; font-size: 16px; line-height: 23px;&quot;&gt;「目次」を表示する プログラム&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre&gt;pochi-2:Test snumano$ cat 5-2.rb
#!/usr/bin/ruby

$KCODE = &#39;UTF-8&#39;

lineWidth = 20
lineWidth2 = 10

index = &#39;目次&#39;
chap1 = &#39;1章:  数&#39;
chap1Page = &#39;p. 1&#39;
chap2 = &#39;2章:  文字&#39;
chap2Page = &#39;p. 72&#39;
chap3 = &#39;3章:  変数&#39;
chap3Page = &#39;p. 118&#39;

puts index.center(lineWidth)
puts chap1.ljust(lineWidth) + chap1Page.center(lineWidth2) 
puts chap2.ljust(lineWidth) + chap2Page.center(lineWidth2) 
puts chap3.ljust(lineWidth) + chap3Page.center(lineWidth2) 
pochi-2:Test snumano$ ./5-2.rb
       目次       
1章:  数             p. 1   
2章:  文字         p. 72   
3章:  変数         p. 118  
&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
今回はここまで。6章以降は後日。。。&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4645842835960512586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4645842835960512586'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/07/ruby-1.html' title='「プログラミング入門　- Rubyを使って -」をやってみた　その1'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-3498120731574933911</id><published>2013-07-14T23:50:00.001+09:00</published><updated>2013-07-15T00:14:48.657+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash rbenv"/><title type='text'>rbenv install時に、.bashrcと.bash_profile動作の違いでつまずいた</title><content type='html'>MacOSXにて、複数versionのrubyを切り替えるツールとしてrvmを使っていましたが、rbenvに切り替える事にしました。&lt;br /&gt;
rbenv installの際つまずいたのですが、原因は「.bashrcと.bash_profileの動作の違いを理解していなかった」事でした。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
詳細は下記の通りです。&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;下記ブログを参考にさせていただきました&lt;br /&gt;&lt;a href=&quot;http://hrysd.hatenablog.com/entry/2012/11/13/012153&quot; target=&quot;_blank&quot;&gt;Mountain Lion に rbenv を導入 - :soy_milk:&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;上記ブログを参考に対応した場合、対応直後が正常にruby versionの切り替え実施できるのですが、MacBook再起動すると「rbenv globalコマンドでrubyのバージョンを変更しても、実際には変更できない」事象が発生しました。しかも、最初再起動時に発生した事に気づかず、「がちゃがちゃ設定をいじっている間に、rbenvの動作がおかしくなった」と思っていたため、原因の特定に時間がかかりました。&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
pochi-2:~ snumano$ rbenv versions&lt;br /&gt;
&amp;nbsp; system&lt;br /&gt;
* 1.9.3-p327 (set by /Users/snumano/.rbenv/version)&lt;br /&gt;
&amp;nbsp; 2.0.0-p247&lt;br /&gt;
pochi-2:~ snumano$ ruby -v&lt;br /&gt;
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]&lt;br /&gt;
pochi-2:~ snumano$ rbenv global 1.9.3-p327&lt;br /&gt;
pochi-2:~ snumano$ rbenv versions&lt;br /&gt;
&amp;nbsp; system&lt;br /&gt;
* 1.9.3-p327 (set by /Users/snumano/.rbenv/version)&lt;br /&gt;
&amp;nbsp; 2.0.0-p247&lt;br /&gt;
pochi-2:~ snumano$ ruby -v&lt;br /&gt;
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;対応は下記どちらかを実施します。&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;「.bashrc」の代わりに「.bash_profile」を指定する&lt;/li&gt;
&lt;li&gt;もしくは、「.bash_profile」の最後に下記設定を加えておく。&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
source ~/.bashrc&lt;/blockquote&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;理由は下記の通り。今回の発生した事象は、後者になります。&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;.bashrcはbash起動時に読み込まれる&lt;/li&gt;
&lt;li&gt;.bash_profileは&lt;span style=&quot;background-color: white; font-family: メイリオ, Meiryo, &#39;Hiragino Kaku Gothic Pro&#39;, &#39;ヒラギノ角ゴ Pro W3&#39;, &#39;ＭＳ Ｐゴシック&#39;, Osaka, sans-serif; line-height: 24px; text-indent: 16px;&quot;&gt;ログインシェルとして起動された時に読み込まれる&lt;/span&gt;　　　&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
久しぶりにshellの設定を触ったので、という言い訳で。。。&lt;br /&gt;
&lt;br /&gt;
参考：&lt;br /&gt;
&lt;a href=&quot;http://256interns.com/practices/24&quot; target=&quot;_blank&quot;&gt;rbenvでRubyを複数バージョンインストールする&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://www.proton.jp/main/apps/bash.html&quot;&gt;http://www.proton.jp/main/apps/bash.html&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: arial; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://stackoverflow.com/questions/10940736/rbenv-not-changing-ruby-version&quot;&gt;http://stackoverflow.com/questions/10940736/rbenv-not-changing-ruby-version&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: arial; font-size: x-small;&quot;&gt;&lt;a href=&quot;http://stackoverflow.com/questions/7780030/how-to-fix-terminal-not-loading-bashrc-on-os-x-lion&quot;&gt;http://stackoverflow.com/questions/7780030/how-to-fix-terminal-not-loading-bashrc-on-os-x-lion&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/3498120731574933911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/3498120731574933911'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/07/rbenv-installbashrcbashprofile.html' title='rbenv install時に、.bashrcと.bash_profile動作の違いでつまずいた'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-3140386239073816059</id><published>2013-06-24T01:11:00.001+09:00</published><updated>2013-06-24T02:30:40.406+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chef"/><category scheme="http://www.blogger.com/atom/ns#" term="vagrant"/><title type='text'>vagrant box addコマンドを実行すると、&quot;Failed to untar the box file...&quot;エラーメッセージが表示されOSイメージをダウンロードできない</title><content type='html'>原因ははっきり分かっていないが、正常にダウンロードできたので、備忘録。&lt;br /&gt;
&lt;br /&gt;
環境は下記。&lt;br /&gt;
host:MacOS10.8&lt;br /&gt;
ruby:1.9.3p429&lt;br /&gt;
vagrant:1.0.7&lt;br /&gt;
&lt;br /&gt;
事象は下記の通り。&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;ホームディレクトリ意外の適当なディレクトリで、vagrant box addコマンドを実行したところ、ダウンロード後のuntarに失敗した旨のメッセージが表示される。&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
pochi:Vagrant snumano$ vagrant box add base http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130427.box&lt;br /&gt;
[vagrant] Downloading with Vagrant::Downloaders::HTTP...&lt;br /&gt;
[vagrant] Downloading box: http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130427.box&lt;br /&gt;
[vagrant] Extracting box...&lt;br /&gt;
[vagrant] Cleaning up downloaded box...&lt;br /&gt;
Failed to untar the box file. This is usually because you&#39;re&lt;br /&gt;
attempting to add a box that isn&#39;t a valid box file. Please&lt;br /&gt;
double check that the box file is properly packaged.&lt;/blockquote&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;~/.vagrant.d以下のtmp, boxesディレクトリには何もファイルなし。&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/mitchellh/vagrant/issues/977&quot;&gt;こちら&lt;/a&gt;には、環境変数HOMEを上書きするのがいやなら、VAGRANT_HOMEを使うようにとのコメントあり。&lt;/li&gt;
&lt;li&gt;vagrantのソースを見るが、環境変数HOMEをどのように設定しているか分からない。(単なるスキル不足。。。)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
とりあえず、ホームディレクトリで再度、vagrant box addを実行してみると、、、&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;~/.vagrant.d/tmp/に、OSイメージがdownloadされる事を確認できるようになった。で、download成功。&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
pochi:~ snumano$ vagrant box add base http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.3-x86_64-v20130101.box&lt;br /&gt;
[vagrant] Downloading with Vagrant::Downloaders::HTTP...&lt;br /&gt;
[vagrant] Downloading box: http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.3-x86_64-v20130101.box&lt;br /&gt;
[vagrant] Extracting box...&lt;br /&gt;
[vagrant] Verifying box...&lt;br /&gt;
[vagrant] Cleaning up downloaded box...&lt;/blockquote&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;nbsp;~/.vagrant.d/boxes/に各種ファイルが作成された。&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
pochi:.vagrant.d snumano$ pwd&lt;br /&gt;
/Users/snumano/.vagrant.d&lt;br /&gt;
pochi:.vagrant.d snumano$ tree&lt;br /&gt;
.&lt;br /&gt;
├── boxes&lt;br /&gt;
│ &amp;nbsp; └── base&lt;br /&gt;
│ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── Vagrantfile&lt;br /&gt;
│ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── box-disk1.vmdk&lt;br /&gt;
│ &amp;nbsp; &amp;nbsp; &amp;nbsp; └── box.ovf&lt;br /&gt;
├── gems&lt;br /&gt;
├── insecure_private_key&lt;br /&gt;
└── tmp&lt;br /&gt;
4 directories, 4 files&lt;/blockquote&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
根本原因は不明のままだが、とりあえず先に進む事とする。&lt;br /&gt;
&lt;br /&gt;
(2013.6.24 追記)&lt;br /&gt;
gem installでvagrantをinstallした場合、上述の通りver1.0.7だが、こちらのサイトでは最新は1.2.2であった。MacOS用のバイナリをinstallして様子見している。&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/3140386239073816059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/3140386239073816059'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/06/vagrant-box-addfailed-to-untar-box.html' title='vagrant box addコマンドを実行すると、&quot;Failed to untar the box file...&quot;エラーメッセージが表示されOSイメージをダウンロードできない'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-7408366841490226516</id><published>2013-06-23T01:06:00.001+09:00</published><updated>2013-06-23T01:09:00.325+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>Mac(10.8)からLinkStation(LS-WXL)へ接続できない場合の対処</title><content type='html'>先日入手したMacBookAir(MacOS 10.8)でTimeMachineの設定する際に、手間取ったのでメモ。&lt;br /&gt;
先に結論を言うと、「ファームウェアのバージョンアップは大事」という事でした。&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
Mac(10.8)からLinkStationへ接続できない場合の対処&lt;/h2&gt;
&lt;div&gt;
環境は下記の通り。&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;旧MacBook(MacOS 10.7)&lt;/li&gt;
&lt;li&gt;新MacBookAir(MacOS 10.8)&lt;/li&gt;
&lt;li&gt;LinkStation(型番:LS-WXL、ファームウェア:ver1.22)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
新MBAからLinkStationにafpおよびsmbの両方とも接続できない。login画面は表示されるが、ID,PWを入力すると認証に失敗し、下記のような画面が表示される。&lt;/div&gt;
&lt;div&gt;
旧MacBookからは、同じLinkStationに問題なく接続できていたのに。。。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfP-wPNf9Y-mhMvG03rcnofB41RxjksD330kHP7_0UF05tM1PZALHeIgK5LaU1trn6zxn303fVgtFz2TT9Vvc1OFDLsq4RoVXW2e9NMrgu6_es6B0BGQJBmq-OeOx1bycFmj40RvoSBbmQ/s1600/MacOS10.8_LS_Error.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;113&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfP-wPNf9Y-mhMvG03rcnofB41RxjksD330kHP7_0UF05tM1PZALHeIgK5LaU1trn6zxn303fVgtFz2TT9Vvc1OFDLsq4RoVXW2e9NMrgu6_es6B0BGQJBmq-OeOx1bycFmj40RvoSBbmQ/s320/MacOS10.8_LS_Error.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
検索してもずばりの回答がないので、まずはLinkStationのファームのバージョンを調べてみた。手元のLinkStationで動いているバージョンは1.22。最新のバージョンは&lt;a href=&quot;http://buffalo.jp/download/driver/hd/ls_fw-mac.html&quot;&gt;1.65&lt;/a&gt;。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
しかも、リリースノートをみると、1.52から1.54にかけて、AFP接続やTimeMachine関係の修正がされているようだ。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
早速1.65のアップデータをDLして、アップデートするもうまく適用できない(どのような状況だったかは、画像が残っていないので省略)。。。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
段階的にアップデートしようと、他のアップデータを探すも1.60のアップデータぐらいしか見つからない。。。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
仕方ないので、1.60を当ててみたら、LInkStationの検索およびアップデート適用までうまくいった。しかし、その後自動でLInkStationが再起動がされ100秒程で起動してくるはずが、100秒経過後、再び、再起動を繰り返しさらに100秒待てというメーッセージが繰り返し表示される事象が発生。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
LinkStation本体をみてみると、&lt;a href=&quot;http://buffalo.jp/download/manual/html/lsxl/statuslamp_wxl.html&quot;&gt;POWERランプが青色点滅&lt;/a&gt;している。実際に起動を繰り返しているようだ。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
とりあえず1.65のアップデータを起動し、LinkStationの検索を実行すると、&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
やはりLinkStationを検索しても見つけてくれない。再起動を繰り返しているので、当然だ。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
あきらめて10分程放っておいたら、いつの間にかLinkStationが見つかっていた。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
すかさず、そのまま1.65にアップデートを実行。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
(結局、なぜ再起動を繰り返していたのかは不明。1.60を適用から15分程度で、LinkStationが安定したようだ)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
そして1.65にアップデート完了、今度は繰り返し、再起動中のメッセージが表示されることもない。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
しかし、、、アップデータ、LinkNabigatorでLinkStationを検索するも見つからない。pingするも返答なし。本体のLEDを確認すると、POWERランプは青色点灯するも、その下のINFO/ERRORランプが点滅している。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
さっきと同様に、これもしばらく放っておいて他の事をしていたら、30分程度でping応答が返ってくるようになっていた。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
(あとで、&lt;a href=&quot;http://buffalo.jp/download/manual/html/lsxl/statuslamp_wxl.html&quot;&gt;こちら&lt;/a&gt;で気づいたが何らかの処理が実行されてたらしい。)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
以上で、LinkStationのファームウェア1.22から1.65にバージョンアップ完了。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
その後、新MBAからLinkStationへAFP,SMB接続できるようになり、本来の目的であった、TimeMachineへの接続もできるようなった。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
(LinkStationでTimeMachineできるようにする設定はいろいろあるようだが、対応している機器であれば、&lt;a href=&quot;http://www.conchikuwa.com/2012/08/03/timemachine2/&quot;&gt;こちらの手順&lt;/a&gt;が一番簡単だと思う。自分もこの手順と同じ設定を実施した)&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
これで、日々のバックアップはTimeMachineに任せる事ができた。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
さらに、他の機器と共有したいファイルは&lt;a href=&quot;http://www.sugarsync.jp/&quot;&gt;SugarSync&lt;/a&gt;を利用する事にした。&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/7408366841490226516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/7408366841490226516'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/06/mac108linkstationls-wxl.html' title='Mac(10.8)からLinkStation(LS-WXL)へ接続できない場合の対処'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfP-wPNf9Y-mhMvG03rcnofB41RxjksD330kHP7_0UF05tM1PZALHeIgK5LaU1trn6zxn303fVgtFz2TT9Vvc1OFDLsq4RoVXW2e9NMrgu6_es6B0BGQJBmq-OeOx1bycFmj40RvoSBbmQ/s72-c/MacOS10.8_LS_Error.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-8156443576627304706</id><published>2013-05-19T17:05:00.002+09:00</published><updated>2013-05-19T17:05:20.532+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Scratch"/><title type='text'>Scratch1.4(相当)とArduinoと光センサーで、かめはめ波測定器(仮)を作ってみた</title><content type='html'>先日、&lt;a href=&quot;http://qiita.com/items/c374ca184fd2e4d528c2&quot;&gt;Qiitaに投稿した&lt;/a&gt;ようにArduinoと光センサーでアナログ値を入力として得られることを確認しました。&lt;br /&gt;
しかし、これを見た子供の反応は薄く、3秒程度で、やっていた3DSに視線を戻していきました。「子供に電子回路の関心を持たせるにはどうしたらいいか」を考え、子ども達が触っているScratchを組み合わせる事にしました。&lt;br /&gt;
&lt;br /&gt;
準備&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;回路&lt;br /&gt;回路に関して準備したものと、回路図は&lt;a href=&quot;http://qiita.com/items/c374ca184fd2e4d528c2&quot;&gt;こちら&lt;/a&gt;と同じです。&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;ScratchとArduinoを連携する環境(S4A)の導入&lt;br /&gt;&lt;a href=&quot;http://seaside.citilab.eu/scratch/downloads&quot;&gt;こちら&lt;/a&gt;のInstallationの1-3を実行します。&lt;br /&gt;1はArduinoの開発環境ですので、Arduinoを触ってる人は、既にinstall済のはずです。&lt;br /&gt;2は、local PCの適当な場所に保存し、1のArduino開発環境でコンパイルおよびArduinoへの転送を実施します。&lt;br /&gt;3については、自分の使用しているOSのものを選択し、installします。私はMac版をinstallしました。下記の「S4A」をクリックしてアプリを起動します。&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi84hoXiTUoOHeTJEyrcnmBz8GDFuWC_1HSN_JUgvTpuC2MR6bGCWBgdSyGNdxbKf6jK_v0oAWDFAC92GYJMM3NapY4lRZG6WiTq_CMW9A7kkpO926kgHVBS7juI8aEPAtb4B719lPQahMa/s1600/S4A.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi84hoXiTUoOHeTJEyrcnmBz8GDFuWC_1HSN_JUgvTpuC2MR6bGCWBgdSyGNdxbKf6jK_v0oAWDFAC92GYJMM3NapY4lRZG6WiTq_CMW9A7kkpO926kgHVBS7juI8aEPAtb4B719lPQahMa/s400/S4A.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;起動後の画面は下記の通りです。Scratch1.4とほぼ同じような画面です。右側のArduinoの絵(スプライト)とAnarogx6,Digitalx2の入力値が表示されます。(まだ何も入力されていないので、適当な値が表示されています)&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd2xJfd37ve9W9e54f_axRjk1h_9em4OoKuVmaGHwqUPNe9r497zMVcbMKZJHNhD3J4-86giRd4Zf7RNZCzlYeDfpM_uVtr4GRx9z9QgXeNHvhNOYqqLRGKAtARGXKuEF8jznXlSBvxcWW/s1600/S4A_start.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;195&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd2xJfd37ve9W9e54f_axRjk1h_9em4OoKuVmaGHwqUPNe9r497zMVcbMKZJHNhD3J4-86giRd4Zf7RNZCzlYeDfpM_uVtr4GRx9z9QgXeNHvhNOYqqLRGKAtARGXKuEF8jznXlSBvxcWW/s400/S4A_start.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;Scratch(実際はS4A)にてプロジェクト(アプリ)の作成&lt;br /&gt;下記のような感じでブロックを並べてみました。(S4Aに含まれるブロックは、Scratchのサイト上で公開できないので、現時点では下記画像でご勘弁ください。Scratch2.0では2013年夏頃に、外部デバイス操作機能が追加予定なので、そうなれば、下記のようなアプリを公開する事ができるようになります)&lt;br /&gt;「value of Analog0」で光センサーの値を取得しています。Analog0の値の変化を読み取り、良いタイミングで期待する値になった場合に、「成功」の判定をしています。&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1RaAgqxIOfIpn1DblvrBLE9zJDE1Hux_fHf26BLgZqashYoelKZKolD5JHTA7KlEowV3hWeAzl3Bm1Hyhiuqzaw8OFSfCt2uXLQqY9fS35TA71aOk2uz6WctYsZm17wB0Us2IRi-BdWqT/s1600/S4A_Kamehameha.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;215&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1RaAgqxIOfIpn1DblvrBLE9zJDE1Hux_fHf26BLgZqashYoelKZKolD5JHTA7KlEowV3hWeAzl3Bm1Hyhiuqzaw8OFSfCt2uXLQqY9fS35TA71aOk2uz6WctYsZm17wB0Us2IRi-BdWqT/s400/S4A_Kamehameha.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;かめはめ波測定器(仮)を実行する&lt;br /&gt;実際に実行してみましょう。以後はScratchの操作方法と同じです。&lt;br /&gt;画面右上の緑の丸をクリックします。すると「かーめーはーめー」とArduinoの絵がしゃべりはじめます。(この辺りは、それっぽい絵を用意すればいいのですが、著作権の問題もあるので、横着してArduinoの絵のままとしています。w)&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijtH6MxRQ48l8ilNZIu5FBo3mjDY-vsrKJO1QhbmLUkQGvtSbgonkPhDZsx1rDU4Jrw4tvjDDYg7QeigJUNjY9Wae_AtT2oQYd015HBOtH39wMGlNsB2MDQ4ktD9RZ0CinuCLylvGSnRuJ/s1600/Kamehame_me.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijtH6MxRQ48l8ilNZIu5FBo3mjDY-vsrKJO1QhbmLUkQGvtSbgonkPhDZsx1rDU4Jrw4tvjDDYg7QeigJUNjY9Wae_AtT2oQYd015HBOtH39wMGlNsB2MDQ4ktD9RZ0CinuCLylvGSnRuJ/s400/Kamehame_me.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;「波ーーー！！」のタイミングで、光センサーに対して、かめはめ波を発射してください。(本当は、手で光センサーを隠すようにすればいいです。。。)&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaH4pttZ1YBtsnMpoPmvN85j28RxQleiACf6rRDQN2WKWlJq1ci5SuROUX1y5EVdbJY_Gif3WkvLyee7etztqv8-Ui8VpbPtd6ephwb61MNvhMcdsmAx70xtxYWiw4cHnzcPoWcZfOLQTn/s1600/Kamehameha_ha.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaH4pttZ1YBtsnMpoPmvN85j28RxQleiACf6rRDQN2WKWlJq1ci5SuROUX1y5EVdbJY_Gif3WkvLyee7etztqv8-Ui8VpbPtd6ephwb61MNvhMcdsmAx70xtxYWiw4cHnzcPoWcZfOLQTn/s400/Kamehameha_ha.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;タイミングとかめはめ波の勢いがあえば「成功」と表示されます。下記の例では発射タイミングが遅く失敗となってます。&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitK2fjdGK0xI_X1XqWG2OsXohGcdZaHCdfq-2HM4tk8j4lqXjAYa-tZJqOugsnOHDwDZQQWl4oOYfqSl9PgWyqry4Ma7PkfncNyWzr1PvxKe4fbw-lQb-sLnvGfvHoe__z8MRcB3goCB2j/s1600/S4A_Kamehamaha_fail.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;221&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitK2fjdGK0xI_X1XqWG2OsXohGcdZaHCdfq-2HM4tk8j4lqXjAYa-tZJqOugsnOHDwDZQQWl4oOYfqSl9PgWyqry4Ma7PkfncNyWzr1PvxKe4fbw-lQb-sLnvGfvHoe__z8MRcB3goCB2j/s320/S4A_Kamehamaha_fail.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyNjEEfXBg19_CiPcehm6Pw_HxI8mP8Oe2IqViKvuc5UJjRVUdAn2EwQssq2LR2RIFG8GTFo371wN8319jE6iWyrwEMjNyxRlKHjBPuDg1Xxo9xPodvOuOj9KHfija6ZKWbusGp7XpFcHJ/s1600/Kamehameha_ok.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyNjEEfXBg19_CiPcehm6Pw_HxI8mP8Oe2IqViKvuc5UJjRVUdAn2EwQssq2LR2RIFG8GTFo371wN8319jE6iWyrwEMjNyxRlKHjBPuDg1Xxo9xPodvOuOj9KHfija6ZKWbusGp7XpFcHJ/s320/Kamehameha_ok.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
以上、簡単ですが、Scratch1.4(S4A)とArduinoと光センサーを組み合わせて、センサーから取得したアナログ値をScratch上に表示する事を試してみました。&lt;/div&gt;
&lt;div&gt;
当初の目的であった「子供に電子回路に関心を持たせる。(少なくとも3秒以上の関心を引く)」については、1分程いろいろ触っていたので成功とします。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Scratch2.0では、同等の外部デバイスとの連携機能は&lt;a href=&quot;http://scratch.mit.edu/overview/&quot;&gt;2013年夏にリリース予定&lt;/a&gt;との事なので、リリースされたら、本アプリをScratchサイトにて公開したと思っています。&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/8156443576627304706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/8156443576627304706'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/05/scratch14arduino.html' title='Scratch1.4(相当)とArduinoと光センサーで、かめはめ波測定器(仮)を作ってみた'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi84hoXiTUoOHeTJEyrcnmBz8GDFuWC_1HSN_JUgvTpuC2MR6bGCWBgdSyGNdxbKf6jK_v0oAWDFAC92GYJMM3NapY4lRZG6WiTq_CMW9A7kkpO926kgHVBS7juI8aEPAtb4B719lPQahMa/s72-c/S4A.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-8585986792078539937</id><published>2013-05-03T16:19:00.000+09:00</published><updated>2013-05-03T16:19:29.134+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arduino"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Arduino x Ruby x 光センサーで電子回路作り</title><content type='html'>最近Arduinoを入手し、どのような使い方ができるか模索しています。&lt;br /&gt;
まずはセンサーで値を取得するところから始めたいと思います。&lt;br /&gt;
センサーも温度、湿度、気圧、光センサーなど様々なものがあります。&lt;a href=&quot;http://akizukidenshi.com/catalog/c/csensor/&quot;&gt;こんな&lt;/a&gt;感じ。&lt;br /&gt;
&lt;br /&gt;
今回は光センサーを使います。手を近づけると値が変わるので、手の動きで操作をする。なんて事が安価にできそうです。&lt;br /&gt;
今回は&lt;a href=&quot;http://qiita.com/&quot;&gt;Qiita&lt;/a&gt;に投稿してみましたので、&lt;a href=&quot;http://qiita.com/items/c374ca184fd2e4d528c2&quot;&gt;こちら&lt;/a&gt;をご覧下さい。&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYWkX1kEpnHjkcr3UhB5dtde39PFO-Koe90W607hXN_JjdzNVNisYD8MOmQGqZDf7JJt9TF7Ne_RTLl0Bkb7pvVjpzxmxQ0JecFJBgrevkXywbAxJH27HPE_LFHLVP-BwKR1aqeKKtArAF/s1600/%E5%86%99%E7%9C%9F.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYWkX1kEpnHjkcr3UhB5dtde39PFO-Koe90W607hXN_JjdzNVNisYD8MOmQGqZDf7JJt9TF7Ne_RTLl0Bkb7pvVjpzxmxQ0JecFJBgrevkXywbAxJH27HPE_LFHLVP-BwKR1aqeKKtArAF/s1600/%E5%86%99%E7%9C%9F.JPG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
今後も、センサーとネットを使って名にができるのか、試してみたいと思います。&lt;br /&gt;
&lt;br /&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/8585986792078539937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/8585986792078539937'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/05/arduino-x-ruby-x.html' title='Arduino x Ruby x 光センサーで電子回路作り'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYWkX1kEpnHjkcr3UhB5dtde39PFO-Koe90W607hXN_JjdzNVNisYD8MOmQGqZDf7JJt9TF7Ne_RTLl0Bkb7pvVjpzxmxQ0JecFJBgrevkXywbAxJH27HPE_LFHLVP-BwKR1aqeKKtArAF/s72-c/%E5%86%99%E7%9C%9F.JPG" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-1572575970796005094</id><published>2013-05-02T23:25:00.001+09:00</published><updated>2013-05-02T23:25:36.169+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>なぜRubyを使っているか？</title><content type='html'>最近Rubyを使う事が少しずつ増えていますが、「なぜRubyなのか？」mindmapでまとめてみました。&lt;br /&gt;
結論としては「気になるツール、技術要素、トピックにアプローチするのに都合がいいから」となりました。&lt;br /&gt;
&lt;br /&gt;
用途によって適切な言語を選択するのがいいのでしょうが、学習コストも高いので現実的ではありません。そういった意味でRubyは幅広い用途で利用シーンがあり、とても重宝しています。&lt;br /&gt;
&lt;br /&gt;
今後はPerlは仕事でのみ利用となり、JavaScriptはiPhoneアプリ開発(TitaniumMobile)やnode.js等で利用が増えてくるのではないかと思ってます。
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;405&quot; src=&quot;http://www.mindomo.com/view.htm?m=206e314afd9b4df3a8e4663d3c3b8495&quot; width=&quot;500&quot;&gt;Your browser does not support frames. View this &lt;a href=&quot;http://www.mindomo.com/view.htm?m=206e314afd9b4df3a8e4663d3c3b8495&quot; target=&quot;_blank&quot;&gt;mind map&lt;/a&gt; on its original site. It was created using Mindomo &lt;a href=&quot;http://www.mindomo.com&quot; target=&quot;_blank&quot;&gt;mind mapping software&lt;/a&gt;.&lt;/iframe&gt;&lt;br /&gt;
Make your own &lt;a href=&quot;http://www.mindomo.com/&quot;&gt;mind maps&lt;/a&gt; with Mindomo.
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/1572575970796005094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/1572575970796005094'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/05/ruby.html' title='なぜRubyを使っているか？'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-4085000589697223521</id><published>2013-04-21T11:28:00.002+09:00</published><updated>2013-04-21T11:28:25.726+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Heroku"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>twitter bootstrap railsでdropdownが動かない時の対処</title><content type='html'>備忘録。&lt;br /&gt;
下記環境のdevelopment環境にてdropdownが動かない、herokuのproduction環境では正常に動作するという事象に遭遇しました。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;環境&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;OS:MacOSX 10.7.5&lt;/li&gt;
&lt;li&gt;Ruby:1.9.3p194&lt;/li&gt;
&lt;li&gt;Rails:3.2.13&lt;/li&gt;
&lt;li&gt;twitter-bootstrap-rails:2.2.6&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;原因&lt;br /&gt;railsのasseteのprecompileという動作が原因のよう。&lt;a href=&quot;http://it.sifr.me/ruby-on-rails-asset-pipeline/&quot;&gt;こちら&lt;/a&gt;参照。&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;対処&lt;br /&gt;&lt;a href=&quot;http://stackoverflow.com/questions/11055373/rails-precompile-why-javascript-does-not-work-locally-but-at-heroku-it-works&quot;&gt;こちら&lt;/a&gt;を参考に、config/environments/development.rbを編集。&lt;br /&gt;&lt;br /&gt;変更前&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;ul&gt;
&lt;li&gt;config.assets.debug = true&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 変更後
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;ul&gt;
&lt;li&gt;config.assets.debug = false&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
以上&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4085000589697223521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/4085000589697223521'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/04/twitter-bootstrap-railsdropdown.html' title='twitter bootstrap railsでdropdownが動かない時の対処'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-7752257969453377272</id><published>2013-04-07T21:00:00.001+09:00</published><updated>2013-04-07T21:00:15.641+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Heroku"/><category scheme="http://www.blogger.com/atom/ns#" term="PaaS"/><category scheme="http://www.blogger.com/atom/ns#" term="Rails"/><title type='text'>HerokuのDB接続時のエラー「FATAL: password authentication failed for user &quot;xxx&quot; (PG::Error)」</title><content type='html'>Herokuの標準DBであるPostgresに接続する外部スクリプトを使っていたある日、突然、該当DBに接続できなくなり、ハマったのでメモ。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;事象&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;外部スクリプトから、HerokuのDBに接続しようとすると「FATAL: password authentication failed for user &quot;xxx&quot; (PG::Error)」エラーが発生し、接続できない。&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;原因&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;答えを先に言うと、「Herokuのメンテナンスのタイミングで、DBの設定情報が変更されていた」でした。&lt;/li&gt;
&lt;li&gt;さらにHerokuからのメールをよくみると、ちゃんと「DBの設定情報が変更される。app側の設定は適切に変更しておくから」と書いてありました。&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
[Heroku Support] Maintenance is required for your database (ticket #xxxxx)&lt;br /&gt;Your database HEROKU_POSTGRESQL_xxx_URL on xxx-xxx-xxx requires maintenance. During this period, your database credentials will become read-only. Once it has completed, your database URL will have changed, but we will update your app&#39;s config variables accordingly.&lt;br /&gt;We expect maintenance to last just a few moments. We will update this ticket once it&#39;s complete&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;対応&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Herokuのサポート対象外(Herokuが知る由もない)外部スクリプトのDB接続情報を適切なものにupdateするだけ。&lt;/li&gt;
&lt;li&gt;Heroku DBの設定情報は「heroku config」コマンドで確認。&lt;a href=&quot;http://www.ownway.info/Ruby/index.php?heroku%2Fhow%2Fmanagement%2Fdatabase&quot;&gt;こちら&lt;/a&gt;を参照。&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
原因が分かったらなんてことはないが、なかなか「メンテナンスによる設定変更」ということに気づけなかったので、残しておきます。</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/7752257969453377272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/7752257969453377272'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/04/herokudbfatal-password-authentication.html' title='HerokuのDB接続時のエラー「FATAL: password authentication failed for user &quot;xxx&quot; (PG::Error)」'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4765774983415815398.post-2735774703726925285</id><published>2013-01-17T01:28:00.001+09:00</published><updated>2013-01-17T12:42:28.036+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="tool"/><title type='text'>Yahoo!Japanカテゴリを解析するgreasemonkeyスクリプトを作成してみた</title><content type='html'>先日公開した、&lt;a href=&quot;http://mbga.0tt.0t0.jp/&quot;&gt;Mobage解析サイト&lt;/a&gt;に続き、&lt;a href=&quot;http://dir.yahoo.co.jp/&quot;&gt;Yahoo!Japanカテゴリ&lt;/a&gt;の解析ツールを作成してみました。&lt;br /&gt;
FireFox用アドオンの&lt;a href=&quot;http://ja.wikipedia.org/wiki/Greasemonkey&quot;&gt;greasemonkey&lt;/a&gt;用ユーザスクリプトを用いて、表示されているサイトのFQDN、AS番号、AS番号運用企業名を表示します。&lt;br /&gt;
greasemonkeyは、javascriptを用いて、webサイト表示時に情報追加表示等ができるもので、以前から気になっていたのですが、今回やっと試すことができました。&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;
動作概要&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Yahoo!Japanカテゴリに登録されているサイトのURL からFQDNを抽出、表示。&lt;/li&gt;
&lt;li&gt;1で抽出したFQDNからIPを求め、そのIPから&lt;a href=&quot;http://ja.wikipedia.org/wiki/AS%E7%95%AA%E5%8F%B7&quot;&gt;AS 番号&lt;/a&gt;情報を抽出、表示。&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
使用方法&lt;/h2&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Firefoxアドオンの&lt;a href=&quot;https://addons.mozilla.org/ja/firefox/addon/greasemonkey/&quot;&gt;greasemonkey&lt;/a&gt;をinstall&lt;/li&gt;
&lt;li&gt;下記サイトにアクセス。&lt;br /&gt;&lt;a href=&quot;http://userscripts.org/scripts/show/156710&quot;&gt;http://userscripts.org/scripts/show/156710&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;画面右上の[install]をクリックし、表示されたウィンドウにて[インストール]をクリック。install完了&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGV1Mw-KTHlAx22cIUwahuCX6Tk8Lr18GjETSUTn8yyYQt_M9bYG4h96i8lV5fPFeEPZThBxW4Fe3AdJE5iX8PtKiHXWmDUF4gYk-crO9GhCMTSnffjq4PzYbXhBBfvsvOYCbM-bZtzUdF/s1600/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+13:01:17+1:04.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;201&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGV1Mw-KTHlAx22cIUwahuCX6Tk8Lr18GjETSUTn8yyYQt_M9bYG4h96i8lV5fPFeEPZThBxW4Fe3AdJE5iX8PtKiHXWmDUF4gYk-crO9GhCMTSnffjq4PzYbXhBBfvsvOYCbM-bZtzUdF/s400/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+13:01:17+1:04.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://dir.yahoo.co.jp/&quot;&gt;Yahoo!Japanカテゴリ&lt;/a&gt;にアクセスすると、installしたスクリプトが自動で起動し、解析結果を自動で表示。&lt;br /&gt;「http://dir.yahoo.co.jp/Computers_and_Internet/Hardware/SmartPhone/Site/Twitter/?q=Twitter」の解析結果は下記の通りです。&lt;br /&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD4UKi8kWkVIgsmouYp9IvhhNTQj7_V-1gv8fYx5euR89szataNcHGWgMtBo7p5rJGyCKNvNdFIXOEmjXgWFN9x4G-gP1LodsWpu6kIIgkJZECMicU7ekQGTBofVfTd4qo3JLL8OfsBAcA/s1600/yahoo_cate.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;313&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD4UKi8kWkVIgsmouYp9IvhhNTQj7_V-1gv8fYx5euR89szataNcHGWgMtBo7p5rJGyCKNvNdFIXOEmjXgWFN9x4G-gP1LodsWpu6kIIgkJZECMicU7ekQGTBofVfTd4qo3JLL8OfsBAcA/s400/yahoo_cate.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;h2&gt;
ハマった点&lt;/h2&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;cross domainでも使用できるGM_xmlhttpRequestを使うために、greasemonkeyを使ったが、GM_xmlhttpRequestは非同期通信となり、AS番号の情報の取得および表示のタイミングを取るのに手間取った。&lt;/li&gt;
&lt;li&gt;AS番号情報の情報参照先サイトのレスポンスが遅いため、全体的に情報表示が遅くなった。これは今後の課題。&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
参考にしたサイト&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Greasemonkey Manul&lt;br /&gt;&lt;a href=&quot;http://wiki.greasespot.net/GM_xmlhttpRequest&quot;&gt;http://wiki.greasespot.net/GM_xmlhttpRequest&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;[javascript]GreaseMonkeyのGM_xmlhttpRequestで同期通信(モドキ)&lt;br /&gt;&lt;a href=&quot;http://d.hatena.ne.jp/daftbeats/touch/20070605/1181019199&quot;&gt;http://d.hatena.ne.jp/daftbeats/touch/20070605/1181019199&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/2735774703726925285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4765774983415815398/posts/default/2735774703726925285'/><link rel='alternate' type='text/html' href='http://nushu123.blogspot.com/2013/01/yahoojapangreasemonkey.html' title='Yahoo!Japanカテゴリを解析するgreasemonkeyスクリプトを作成してみた'/><author><name>test</name><uri>http://www.blogger.com/profile/15811434664208141069</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGV1Mw-KTHlAx22cIUwahuCX6Tk8Lr18GjETSUTn8yyYQt_M9bYG4h96i8lV5fPFeEPZThBxW4Fe3AdJE5iX8PtKiHXWmDUF4gYk-crO9GhCMTSnffjq4PzYbXhBBfvsvOYCbM-bZtzUdF/s72-c/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88+13:01:17+1:04.png" height="72" width="72"/></entry></feed>