Mastodonを読む/読解環境構築(Windows10)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
[[Mastodonを読む]]
#contents
*はじめに [#edb34c21]
コードを読む際に、「よくわからん」ということはよくありま...
コマンドラインのプログラムなら簡単に動かせますが、Webアプ...
最近では[[DevOps>https://ja.wikipedia.org/wiki/DevOps]]と...
今回は読解の準備として[[ドキュメント>https://github.com/t...
というわけで、以降は読解はありません。
*VagrantとVirtualBoxのインストール [#veea66e7]
まず、[[Vagrant>https://www.vagrantup.com/]]と[[VirtualBo...
*vagrant-hostsupdaterのインストール(SSLエラー×2) [#ea4d...
ドキュメントに従ってVagrantのプラグイン入れようとしたらエ...
C:\Users\junjis>vagrant plugin install vagrant-hostsupda...
Installing the 'vagrant-hostsupdater' plugin. This can t...
Vagrant failed to load a configured plugin source. This ...
by a variety of issues including: transient connectivity...
filtering rejecting access to a configured plugin source...
plugin source not responding correctly. Please review th...
below to help resolve the issue:
SSL_connect returned=1 errno=0 state=SSLv3 read server...
Source: https://rubygems.org/
「SSL_connect~」をそのまま検索してみたところ、証明書が更...
C:\Users\junjis>cd C:\HashiCorp\Vagrant\embedded\bin
C:\HashiCorp\Vagrant\embedded\bin>gem install rubygems-u...
Fetching: rubygems-update-2.6.11.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - C:/HashiCorp/Vagran...
ぐふっ、と思ったらコマンドプロンプトを管理者で開いてない...
C:\HashiCorp\Vagrant\embedded\bin>gem install rubygems-u...
Fetching: rubygems-update-2.6.11.gem (100%)
Successfully installed rubygems-update-2.6.11
Parsing documentation for rubygems-update-2.6.11
Installing ri documentation for rubygems-update-2.6.11
Done installing documentation for rubygems-update after ...
WARNING: Unable to pull data from 'https://rubygems.org...
1 gem installed
C:\HashiCorp\Vagrant\embedded\bin>update_rubygems
プラグインインストールリトライ、
C:\Users\junjis>vagrant plugin install vagrant-hostsupda...
Installing the 'vagrant-hostsupdater' plugin. This can t...
ERROR: SSL verification error at depth 3: unable to get...
ERROR: You must add /C=US/O=Starfield Technologies, Inc...
Vagrant failed to load a configured plugin source. This ...
by a variety of issues including: transient connectivity...
filtering rejecting access to a configured plugin source...
plugin source not responding correctly. Please review th...
below to help resolve the issue:
SSL_connect returned=1 errno=0 state=SSLv3 read server...
Source: https://gems.hashicorp.com/
うーむ。
[[「Windows上のRubyでSSL接続時にcertificate verify failed...
C:\Users\junjis>set SSL_CERT_FILE=Downloads/cacert.pem
C:\Users\junjis>vagrant plugin install vagrant-hostsupda...
Installing the 'vagrant-hostsupdater' plugin. This can t...
Fetching: vagrant-hostsupdater-1.0.2.gem (100%)
Installed the plugin 'vagrant-hostsupdater (1.0.2)'!
入った?hostsupdater見当たらんぞ??と思ったら、ホーム以...
ちなみに、後述の「vagrant upがうまくいかない」試行錯誤で...
*Mastodonのチェックアウト [#m3d46e4d]
gitは[[Git for Windows>https://git-for-windows.github.io/...
D:\src>git clone https://github.com/tootsuite/mastodon.git
D:\src>cd mastodon
ドライブ移ってるのはマシンの都合で深い意味はありません。...
このままmaster読んでもいいですが、読解なのでバージョン付...
D:\src\mastodon>git tag
省略
v1.2.2
v1.3
v1.3.1
v1.3.2
D:\src\mastodon>git checkout v1.3.2
ちなみに、4/27にプレ調査でcloneしたときは1.2.2が最新でし...
*Vagrantの実行(不具合と対応) [#l0c5123e]
それではVagrantを実行し、開発環境を立ち上げます。
D:\src\mastodon>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. A...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
default: URL: https://atlas.hashicorp.com/ubuntu/tru...
==> default: Adding box 'ubuntu/trusty64' (v20170422.0.0...
default: Downloading: https://atlas.hashicorp.com/ub...
default: Progress: 100% (Rate: 2485k/s, Estimated ti...
==> default: Successfully added box 'ubuntu/trusty64' (v...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to ...
==> default: Setting the name of the VM: mastodon
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfa...
==> default: Preparing network interfaces based on confi...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 (guest) => 3000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take ...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection reset. Retrying...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/li...
以下省略
うーん、と、管理者モードで試してみても駄目。32ビットだか...
[[「vagrant up起動に失敗したら」>http://qiita.com/amateur...
例外が起きているところを見ても普通にSSHのネゴシエーション...
で、今すぐ直したい場合は自分でファイルを置き換えてねとの...
-C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/te...
-C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/li...
-C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/pl...
の3ファイルをそれぞれ置き換え。
では改めて「vagrant up」。おぉ進んだ・・・と順調なところ...
D:\src\mastodon>vagrant up
これより前スクロールアウト
from C:/Users/junjis/.vagrant.d/gems/2.2.5/gems/...
以下省略
スタックトレースがコマンドラインバッファ越えるぐらい出ま...
D:\src\mastodon>vagrant up
省略
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match...
default: VirtualBox! In most cases this is fine, but...
default: prevent things such as shared folders from ...
default: shared folder errors, please make sure the ...
default: virtual machine match the version of Virtua...
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.3.36
default: VirtualBox Version: 5.1
==> default: [vagrant-hostsupdater] Checking for host en...
==> default: [vagrant-hostsupdater] Writing the followin...
==> default: [vagrant-hostsupdater] 192.168.42.42 mas...
==> default: [vagrant-hostsupdater] This operation requi...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => D:/src/mastodon
Vagrant was unable to mount VirtualBox shared folders. T...
because the filesystem "vboxsf" is not available. This f...
made available via the VirtualBox Guest Additions and ke...
Please verify that these guest additions are properly in...
guest. This is not a bug in Vagrant and is usually cause...
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o rw,vers=3,tcp,uid=1000,gid=1000 vagra...
The error output from the command was:
fmask =<arg> umask of regular files
ぐふ。まあ初めの方で言われているようにGuest Additionsのバ...
幸い?GUI表示しているのでGuest Additionsを更新しようと思...
とりあえず「vagrant halt」して止めておく。
*Vagrant実行(N度目の正直) [#b696badd]
Guest Additions更新する方法を考えてみたのですがとりあえず...
「vagrant up」したところ、上でVM作られているのにまた作ろ...
で改めて「vagrant up」→SSH接続待ち中にinvalid stateになっ...
VagrantfileでGUIを表示するようにして、ついでにプロビジョ...
というわけで何度目かわからないけど「vagrant up」、おープ...
http://mastodon.devにアクセスして、admin@mastodon.devでロ...
$ rails c
> u = User.first
> u.email = 'admin@mastodon.dev'
> u.save
で修正。これでようやくログイン、トゥートすることができま...
終了行:
[[Mastodonを読む]]
#contents
*はじめに [#edb34c21]
コードを読む際に、「よくわからん」ということはよくありま...
コマンドラインのプログラムなら簡単に動かせますが、Webアプ...
最近では[[DevOps>https://ja.wikipedia.org/wiki/DevOps]]と...
今回は読解の準備として[[ドキュメント>https://github.com/t...
というわけで、以降は読解はありません。
*VagrantとVirtualBoxのインストール [#veea66e7]
まず、[[Vagrant>https://www.vagrantup.com/]]と[[VirtualBo...
*vagrant-hostsupdaterのインストール(SSLエラー×2) [#ea4d...
ドキュメントに従ってVagrantのプラグイン入れようとしたらエ...
C:\Users\junjis>vagrant plugin install vagrant-hostsupda...
Installing the 'vagrant-hostsupdater' plugin. This can t...
Vagrant failed to load a configured plugin source. This ...
by a variety of issues including: transient connectivity...
filtering rejecting access to a configured plugin source...
plugin source not responding correctly. Please review th...
below to help resolve the issue:
SSL_connect returned=1 errno=0 state=SSLv3 read server...
Source: https://rubygems.org/
「SSL_connect~」をそのまま検索してみたところ、証明書が更...
C:\Users\junjis>cd C:\HashiCorp\Vagrant\embedded\bin
C:\HashiCorp\Vagrant\embedded\bin>gem install rubygems-u...
Fetching: rubygems-update-2.6.11.gem (100%)
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - C:/HashiCorp/Vagran...
ぐふっ、と思ったらコマンドプロンプトを管理者で開いてない...
C:\HashiCorp\Vagrant\embedded\bin>gem install rubygems-u...
Fetching: rubygems-update-2.6.11.gem (100%)
Successfully installed rubygems-update-2.6.11
Parsing documentation for rubygems-update-2.6.11
Installing ri documentation for rubygems-update-2.6.11
Done installing documentation for rubygems-update after ...
WARNING: Unable to pull data from 'https://rubygems.org...
1 gem installed
C:\HashiCorp\Vagrant\embedded\bin>update_rubygems
プラグインインストールリトライ、
C:\Users\junjis>vagrant plugin install vagrant-hostsupda...
Installing the 'vagrant-hostsupdater' plugin. This can t...
ERROR: SSL verification error at depth 3: unable to get...
ERROR: You must add /C=US/O=Starfield Technologies, Inc...
Vagrant failed to load a configured plugin source. This ...
by a variety of issues including: transient connectivity...
filtering rejecting access to a configured plugin source...
plugin source not responding correctly. Please review th...
below to help resolve the issue:
SSL_connect returned=1 errno=0 state=SSLv3 read server...
Source: https://gems.hashicorp.com/
うーむ。
[[「Windows上のRubyでSSL接続時にcertificate verify failed...
C:\Users\junjis>set SSL_CERT_FILE=Downloads/cacert.pem
C:\Users\junjis>vagrant plugin install vagrant-hostsupda...
Installing the 'vagrant-hostsupdater' plugin. This can t...
Fetching: vagrant-hostsupdater-1.0.2.gem (100%)
Installed the plugin 'vagrant-hostsupdater (1.0.2)'!
入った?hostsupdater見当たらんぞ??と思ったら、ホーム以...
ちなみに、後述の「vagrant upがうまくいかない」試行錯誤で...
*Mastodonのチェックアウト [#m3d46e4d]
gitは[[Git for Windows>https://git-for-windows.github.io/...
D:\src>git clone https://github.com/tootsuite/mastodon.git
D:\src>cd mastodon
ドライブ移ってるのはマシンの都合で深い意味はありません。...
このままmaster読んでもいいですが、読解なのでバージョン付...
D:\src\mastodon>git tag
省略
v1.2.2
v1.3
v1.3.1
v1.3.2
D:\src\mastodon>git checkout v1.3.2
ちなみに、4/27にプレ調査でcloneしたときは1.2.2が最新でし...
*Vagrantの実行(不具合と対応) [#l0c5123e]
それではVagrantを実行し、開発環境を立ち上げます。
D:\src\mastodon>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/trusty64' could not be found. A...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'ubuntu/trusty64'
default: URL: https://atlas.hashicorp.com/ubuntu/tru...
==> default: Adding box 'ubuntu/trusty64' (v20170422.0.0...
default: Downloading: https://atlas.hashicorp.com/ub...
default: Progress: 100% (Rate: 2485k/s, Estimated ti...
==> default: Successfully added box 'ubuntu/trusty64' (v...
==> default: Importing base box 'ubuntu/trusty64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty64' is up to ...
==> default: Setting the name of the VM: mastodon
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfa...
==> default: Preparing network interfaces based on confi...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 80 (guest) => 3000 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take ...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection reset. Retrying...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
C:/HashiCorp/Vagrant/embedded/gems/gems/net-ssh-4.1.0/li...
以下省略
うーん、と、管理者モードで試してみても駄目。32ビットだか...
[[「vagrant up起動に失敗したら」>http://qiita.com/amateur...
例外が起きているところを見ても普通にSSHのネゴシエーション...
で、今すぐ直したい場合は自分でファイルを置き換えてねとの...
-C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/te...
-C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/li...
-C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.4/pl...
の3ファイルをそれぞれ置き換え。
では改めて「vagrant up」。おぉ進んだ・・・と順調なところ...
D:\src\mastodon>vagrant up
これより前スクロールアウト
from C:/Users/junjis/.vagrant.d/gems/2.2.5/gems/...
以下省略
スタックトレースがコマンドラインバッファ越えるぐらい出ま...
D:\src\mastodon>vagrant up
省略
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match...
default: VirtualBox! In most cases this is fine, but...
default: prevent things such as shared folders from ...
default: shared folder errors, please make sure the ...
default: virtual machine match the version of Virtua...
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.3.36
default: VirtualBox Version: 5.1
==> default: [vagrant-hostsupdater] Checking for host en...
==> default: [vagrant-hostsupdater] Writing the followin...
==> default: [vagrant-hostsupdater] 192.168.42.42 mas...
==> default: [vagrant-hostsupdater] This operation requi...
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => D:/src/mastodon
Vagrant was unable to mount VirtualBox shared folders. T...
because the filesystem "vboxsf" is not available. This f...
made available via the VirtualBox Guest Additions and ke...
Please verify that these guest additions are properly in...
guest. This is not a bug in Vagrant and is usually cause...
Vagrant box. For context, the command attempted was:
mount -t vboxsf -o rw,vers=3,tcp,uid=1000,gid=1000 vagra...
The error output from the command was:
fmask =<arg> umask of regular files
ぐふ。まあ初めの方で言われているようにGuest Additionsのバ...
幸い?GUI表示しているのでGuest Additionsを更新しようと思...
とりあえず「vagrant halt」して止めておく。
*Vagrant実行(N度目の正直) [#b696badd]
Guest Additions更新する方法を考えてみたのですがとりあえず...
「vagrant up」したところ、上でVM作られているのにまた作ろ...
で改めて「vagrant up」→SSH接続待ち中にinvalid stateになっ...
VagrantfileでGUIを表示するようにして、ついでにプロビジョ...
というわけで何度目かわからないけど「vagrant up」、おープ...
http://mastodon.devにアクセスして、admin@mastodon.devでロ...
$ rails c
> u = User.first
> u.email = 'admin@mastodon.dev'
> u.save
で修正。これでようやくログイン、トゥートすることができま...
ページ名: