<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shinkufencer</author_name>
  <author_url>https://blog.hatena.ne.jp/shinkufencer/</author_url>
  <blog_title>コード日進月歩</blog_title>
  <blog_url>https://shinkufencer.hateblo.jp/</blog_url>
  <categories>
    <anon>Tips</anon>
  </categories>
  <description>結構環境によって対処法が変わるので雑な感じのメモ 遭遇した状況 ログインしているshでは上手く行くのに、cronで実行すると失敗する 実行していたのは bin/rails から始まる rake タスク 原因 gemや実行したいコマンドの実行パスが通っていないのが原因 解決策 パスを通してあげる。お手元のshでできている場合はその起動profileで実行パスを通せているということなので、能動的にそれらを実行してあげれば大体できるようになる。たとえば、実行するシェルファイルに下記の記述を書き足すだけで動くようにになったりする。 . /etc/profile 参考リンク cronで実行した場合のパス…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshinkufencer.hateblo.jp%2Fentry%2F2019%2F07%2F29%2F234827&quot; title=&quot;crontabは従来のログインシェルと違ってPATHが通ってないことがあるので気をつける - コード日進月歩&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-07-29 23:48:27</published>
  <title>crontabは従来のログインシェルと違ってPATHが通ってないことがあるので気をつける</title>
  <type>rich</type>
  <url>https://shinkufencer.hateblo.jp/entry/2019/07/29/234827</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
