<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rochefort</author_name>
  <author_url>https://blog.hatena.ne.jp/rochefort/</author_url>
  <blog_title>rochefort's blog</blog_title>
  <blog_url>https://rochefort.hatenablog.com/</blog_url>
  <categories>
    <anon>active_record</anon>
    <anon>rails</anon>
    <anon>ruby</anon>
  </categories>
  <description>ググるとActive Recordを単独で使う方法が出てきますが、手元のRails7系のActive Recordだと動かなかったので、調べながらやってみました。 結論 以下で動きました。 # Rakefile require &quot;bundler/gem_tasks&quot; require &quot;bundler/setup&quot; require &quot;active_record&quot; require &quot;erb&quot; include ActiveRecord::Tasks # rubocop:disable Style/MixinUsage root_dir = File.dirname(__FILE__) databas…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frochefort.hatenablog.com%2Fentry%2Fuse_active_record_without_rails&quot; title=&quot;active_recordをrails以外で使う - rochefort&amp;#39;s blog&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>2023-04-17 22:41:59</published>
  <title>active_recordをrails以外で使う</title>
  <type>rich</type>
  <url>https://rochefort.hatenablog.com/entry/use_active_record_without_rails</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
