「音(おと)いれっと」作りました
音(おと)いれっと作りました
いつでもどこでもトイレの流水音を再生出来る「音いれっと」をリリースしました!!
音姫とか疑似流水音を流す機械を設置できないところとか、法人じゃなくて個人の家でトイレの音が気になる><みたいな時に使えるウェブページを作りました。
ネットワークのある環境で、アクセスすれば、さくっと再生ボタンがあります。それポチッと押すと12秒ぐらいの流水音が流れます(リクエストがあったので、もっと長いのを用意する予定)
節水にも繋がると思いますので、ぜひぜひお使いくださいませw
ということで、宣伝でしたw
vagrant upしたら、「Vagrant::Errors::LinuxMountFailed」ってエラーが出たときの対処【解決編(多分)】
この二本のエントリの続きです。
前回のおさらい
vagrant upして、エラー出る -> vagrant-vbguestプラグインとやらが原因 -> そもそもプラグイン入ってないやないかーい -> vagrant-vbguestインストールしよ -> うわっ、インストールでエラー出た! -> nokogiriをvagrantフォルダにインストール! -> vagrant-vbguestインストールできたー!!(イマココ
お楽しみのvagrant up!!
default: Warning: Connection timeout. Retrying... default: Warning: Remote connection disconnect. Retrying... ==> default: Machine booted and ready! GuestAdditions versions on your host (4.3.14) and guest (4.3.20) do not match. Loaded plugins: fastestmirror Setting up Install Process
な、なんだと・・・!?
しかし、この後に
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso Installing Virtualbox Guest Additions 4.3.14 - guest version is 4.3.20 Verifying archive integrity... All good. Uncompressing VirtualBox 4.3.14 Guest Additions for Linux............ VirtualBox Guest Additions installer Removing installed version 4.3.20 of VirtualBox Guest Additions... Copying additional installer modules ... Installing additional modules ... Removing existing VirtualBox non-DKMS kernel modules[ OK ] Building the VirtualBox Guest Additions kernel modules Building the main Guest Additions module[ OK ] Building the shared folder support module[ OK ] Building the OpenGL support module[ OK ] Doing non-kernel setup of the Guest Additions[ OK ] Starting the VirtualBox Guest Additions [ OK ] Installing the Window System drivers
おぉ、ズレてるversionのGuest Additionsがインストールされておる・・・!!
そして、vagrant haltして、もう一度upさせてみる(多分reloadでもOK)
$ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly ==> default: Forwarding ports... default: 22 => 2222 (adapter 1) ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Warning: Connection timeout. Retrying... default: Warning: Remote connection disconnect. Retrying... ==> default: Machine booted and ready! GuestAdditions 4.3.14 running --- OK. ==> default: Checking for guest additions in VM... (以下略)
という感じで、無事にshared_folderもきちんと読み込まれるし、動くようになりましたー!!
とりあえず、
1. vagrant upしてMountFailedになったときは、エラーメッセージ読む
2. vagrant-vbguestがインストールされてるか調べる
3. インストールされてたら、バージョンが適切かもついでに調べる
という感じですかね。
vbguestのバージョンアップ関連は以下の記事が参考になります。
特に自動更新の停止とかしておくと良いかもしれないけど、それはまた今度考えよ。
ノシノシ
vagrant upしたら、「Vagrant::Errors::LinuxMountFailed」ってエラーが出たときの対処【vagrant-vbguestのインストール】
そう、前回の続き。
プラグインの確認
この環境を作ってくれた人に確認すると、 vagrant-vbguestというvagrantのプラグインの利用を前提にしているらしいので、こちらをインストール。
$ vagrant plugin install vagrant-vbguest Installing the 'vagrant-vbguest' plugin. This can take a few minutes... Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is: An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.
なんかnokorigiのインストールのところで止まるとか言われるので、これもインストールするか。
$ gem install nokogiri -v '1.6.6.2' Building native extensions. This could take a while... Successfully installed nokogiri-1.6.6.2 Parsing documentation for nokogiri-1.6.6.2 Done installing documentation for nokogiri after 2 seconds 1 gem installed
そして、vagrant-vbguestを再インストールしようとしたけどまた同じエラー(´・_・`)
さっきのインストールで、nokogiri (1.6.6.2, 1.6.3.1)と共存してるのがダメなのかな?と思い、1.6.3.1をunistallして再チャレンジ。
Installing the 'vagrant-vbguest' plugin. This can take a few minutes... Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is: An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.
やっぱダメだ:;(∩´﹏`∩);:
vagrant-vbguestプラグイン自体の問題ではなく、そもそもvagrantのプラグインをインストールするときのエラーでは、と思ったら下記の記事見つけた。
記事の通り、xcodeの何かをインストール。
$ xcode-select --install xcode-select: note: install requested for command line developer tools
記事内では何か言われてたけど、何もエラーとかでなかったので、再度vagrant plugin installにチャレンジ₍₍⁽⁽(ી(*゚▽゚*)ʃ)₎₎⁾⁾
$ vagrant plugin install vagrant-vbguest Installing the 'vagrant-vbguest' plugin. This can take a few minutes... Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is: An error occurred while installing nokogiri (1.6.6.2), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.6.6.2'` succeeds before bundling.
またダメだ(´・_・`)
さっきの記事に書いてた「-- --use-system-libraries」オプションを付けてinstallする方法してもダメ。
で、次に見つけたのはこんな記事。
なんかいけそう!!w
ブログの通りに・・・
$ gem install --install-dir ~/.vagrant.d/gems nokogiri -v '1.6.6.2' Building native extensions. This could take a while... Successfully installed nokogiri-1.6.6.2 Parsing documentation for nokogiri-1.6.6.2 Installing ri documentation for nokogiri-1.6.6.2 Done installing documentation for nokogiri after 3 seconds 1 gem installed
これをした後に・・・
$ vagrant plugin install vagrant-vbguest Installing the 'vagrant-vbguest' plugin. This can take a few minutes... Bundler, the underlying system Vagrant uses to install plugins, reported an error. The error is shown below. These errors are usually caused by misconfigured plugin installations or transient network issues. The error from Bundler is: Net::HTTPNotFound: No gems found matching "vagrant-vmware-fusion" "3.1.2" nil
エラーメッセージ変わった!!w
でも、これはなんかネットワークの問題だったりして、もう一度チャレンジするといけるパターンって知ってるので・・・
$ vagrant plugin install vagrant-vbguest Installing the 'vagrant-vbguest' plugin. This can take a few minutes... Installed the plugin 'vagrant-vbguest (0.10.0)'!
来ました!!やったー₍₍⁽⁽(ી(*゚▽゚*)ʃ)₎₎⁾⁾
と、もともとやりたかったのはvagrant upのエラー解消なので、とりあえずvagrant-vbguestプラグインをインストールするところまでいけました!!
次回はguest addtionsのなんちゃらとかその辺やります(´・_・`)
vagrant upしたら、「Vagrant::Errors::LinuxMountFailed」ってエラーが出たときの対処
vagrant upした時、下記のようなエラーが出てました。
Vagrant::Errors::LinuxMountFailed: Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly. The command attempted was: mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant
こういう時は、vboxをリビルドする必要があるらしいので
sshログインして、sudo /etc/init.d/vboxadd setupでリビルド。
vagrant ssh
Last login: Mon Jun 22 06:57:40 2015 from 10.0.2.2 [vagrant@localhost ~]$ sudo /etc/init.d/vboxadd setup Removing existing VirtualBox non-DKMS kernel modules [ OK ] Building the VirtualBox Guest Additions kernel modules The gcc utility was not found. If the following module compilation fails then this could be the reason and you should try installing it. The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason. The missing package can be probably installed with yum install kernel-devel-2.6.32-504.23.4.el6.x86_64 Building the main Guest Additions module [失敗] (Look at /var/log/vboxadd-install.log to find out what went wrong) Doing non-kernel setup of the Guest Additions [ OK ]
エラーも出るし、一旦指示に従って下記コマンドを実行!
sudo yum install -y kernel-devel-2.6.32-504.23.4.el6.x86_64
そして、vboxをリビルドしても同じエラーが出る。
もともとVagrantfileで指定していたshared_folderをきちんと初めにupする時に設定していたことが悪かったのかな?とか思って、一旦悩んだ結果vagrant destroy。これで、同じ問題が起こったら、ゼロから始めてみることにする。
結果
同じ問題起こったので次の日にもう一回チャレンジしてみます:;(∩´﹏`∩);:
kintoneでCSV読み込みしようと思ったら、ルックアップフィールドでつまづいた話。
シナリオ
ルックアップフィールドを設定しているアプリにCSVでデータを読み込もうと思ったら、
該当しているルックアップフィールドがCSV読み込み画面に出てこない:;(∩´﹏`∩);:
それ故に、CSVで読み込んでもそのフィールドは更新されない!!辛い。
具体例
チーム管理をするために、「チーム」アプリと「メンバー」アプリを作成。
メンバーは一つだけチームに所属するとする。(他の会社の中でのローカルルールは知りません)
メンバーがどういう仕事をしているかをレコードで表示するためにチームアプリ内の「チームID」をルックアップフィールドとしてチームアプリ内のデータを参照していた。
メンバーの情報を一気に取り込もうと、CSV読み込みを試みる。
「アプリのフィールドと読み込むデータの列を対応付けます。」と書いてある通り、自動である程度対応させてくれている。最高!
しかし、チームIDがアプリのフィールドとして出てこない・・・。
手動でデータ更新していた時には、全く問題もなくルックアップフィールドも動いていたのに・・・。
と、こんな感じでした。
原因と解決策
原因は、チームアプリのフィールドの設定でした。
チームIDの設定で「値の重複を禁止する」にチェックを入れていないことが原因でした。(杜撰なデータ管理になるのでIDはユニークにせねば)
確かに、値の重複を禁止していないと該当するデータが複数あった場合など、CSVの一括読み込みでは対応しきれないことになる。
では、なぜ手動で更新していた時には問題なく動いていたのか?
それは、該当するデータが複数あった場合は、"人間が選択できる"状態であるからっぽい。(実際はどうかは分からない)
基本的には、kintone上では複合キーのようなことは、APIなどを用いないと事実上不可能ではあるが、手動で、目で見てデータを選択していくのであればありなのかもしれない。非常に人よりで、ある種柔軟なソフトなんだな、と思った出来事でした。