万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

MastodonでのVagrant起動

vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater]   found entry for: 192.168.42.42 mastodon.dev
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
    default: Running: inline script
==> default: /tmp/vagrant-shell: line 4: rails: command not found
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Railsがない?手動で入れたw

vagrant ssh

で入り、

vagrant@mastodon:~$ gem install rails
The SSH command responded with a non-zero exit status. Vagrant

このヘンテコなメッセージは、vagrantsshで入った状態で

vagrant@mastodon:~$ rm -rf /etc/udev/rules.d/70-persistent-net.rules
vagrant@mastodon:~$ rm -rf /etc/udev/rules.d/70-persistent-cd.rules

してexitして抜けてvagrant reloadする。

==> default: /home/vagrant/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib/bundler/spec_set.rb:87:in `block in materialize'
==> default: :
==> default: Could not find actionview-5.0.2 in any of the sources
==> default:  (
==> default: Bundler::GemNotFound
==> default: )

って・・・

vagrant@mastodon:~$ gem install actionview

してもだめ。

仕方ないのでvagrant sshで入って、

mastodon/Vagrantfile at master · tootsuite/mastodon · GitHub

ここにあるVagrantfileにある以下のコマンドを行った。

# Install gems and node modules
gem install bundler
bundle install
yarn install

このあとホストマシンで、vagrant upした。

以下でエラー出る・・。

/vagrant/app/views/about/show.html.haml

f:id:shinriyo:20170430171339p:plain