ミライハック
  • Home
  • Categories
  • About

>> Home / インターネット

Launchy::CommandNotFoundErrorの解決策

∵ Takayoshi Saito ∴ 2019-02-23 ∞ 1'

AWS + Rails + letter_openerでLaunchy::CommandNotFoundError

AWS(AmazonLinux)でRuby on Railsのアプリを構築していたのですが、letter_openerというgemでLaunchy::CommandNotFoundErrorというエラーが出ていました。

Launchy::CommandNotFoundError (Unable to find a browser command. If this is unexpected, Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new):

ググってもHerokuやVagrantやletter_opener_webの事例しか出てこずに四苦八苦したのですがエラーメッセージにあるようにブラウザコマンドがないことが原因なので、Headless Chromeをインストールしたら解決しました。AmazonLinuxの場合は以下のコマンドでインストールできます。

$ curl https://intoli.com/install-google-chrome.sh | bash

Launchyの送信するメールを外部ドメインで読みたい場合は config/environments/development.rb でletter_opener_webを使うように設定すると良いでしょう。

  config.action_mailer.default_url_options = { host: "localhost", port: "3000" }
  config.action_mailer.delivery_method = :letter_opener_web
Search

Categories
  • LInux
  • インターネット
  • インフラ
  • エッセイ
  • ゲーム
  • システム開発
  • セキュリティ
  • データサイエンス
  • 国際関係
  • 政治
  • 歴史
  • 社会学
  • 自己紹介
  • 行ってきた

Pages
  • 齊藤貴義
  • 職務経歴
  • スクレイピング・ハッキング・ラボ サポートページ
  • 『爆速開発を支えるClaude Code上級者テクニック』サポートページ

2026 © Takayoshi Saito | Twitter GitHub | Built on Zola