1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Mojo🔥という優秀な言語がリリースされました(遅い)。サブPCで遊んでいたとある日、Mojoコマンドが動作しませんでした。

出力

$ mojo
Usage: APPLICATION COMMAND [OPTIONS]

  mojo version
  mojo generate lite-app
  ./myapp.pl daemon -m production -l http://*:8080
  ./myapp.pl get /foo
  ./myapp.pl routes -v

Tip: CGI and PSGI environments can be automatically detected very often and
     work without commands.

Options (for all commands):
  -h, --help          Get more information on a specific command
      --home <path>   Path to home directory of your application, defaults to
                      the value of MOJO_HOME or auto-detection
  -m, --mode <name>   Operating mode for your application, defaults to the
                      value of MOJO_MODE/PLACK_ENV or "development"

Commands:
 cgi       Start application with CGI
 cpanify   Upload distribution to CPAN
 daemon    Start application with HTTP and WebSocket server
 eval      Run code against application
 fastcgi   Start application with FastCGI.
 generate  Generate files and directories from templates
 get       Perform HTTP request
 inflate   Inflate embedded files to real files
 prefork   Start application with pre-forking HTTP and WebSocket server
 psgi      Start application with PSGI
 routes    Show available routes
 version   Show versions of available modules

See 'APPLICATION help COMMAND' for more information on a specific command.

このような出力がされたことから、MojoliciousというPerlで書かれたリアルタイムWebフレームワークだとわかりました。
Mojoliciousは、シンプルかつ強力なウェブアプリケーションを構築するためのフレームワークで、非同期I/O、WebSocket、JSON、テンプレートエンジンなどの機能があるそうです。

結論

結論をいうと、もう一度Mojo🔥のパスを通してあげるだけでいいです。

MOJO_PATH=$(modular config mojo.path) \
  && BASHRC=$( [ -f "$HOME/.bash_profile" ] && echo "$HOME/.bash_profile" || echo "$HOME/.bashrc" ) \
  && echo 'export MODULAR_HOME="'$HOME'/.modular"' >> "$BASHRC" \
  && echo 'export PATH="'$MOJO_PATH'/bin:$PATH"' >> "$BASHRC" \
  && source "$BASHRC"

おわり

なぜMojoliciousくんが私のUbuntuにお邪魔していたのかは不明です。おそらく何かしらの依存関係?じゃあパス無効にしちゃまずいか。
今のところ問題が発生していないので、様子見します。

参考文献

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?