AI prompts
base on ð Railsãã¥ãŒããªã¢ã«ã§æ¡çšããŠããã¯ã©ãŠãéçºç°å¢ãGitHub Codespacesãã®ãã³ãã¬ãŒãã§ãã # Codespaces â¥ïž Railsãã¥ãŒããªã¢ã«
æ¬ãªããžããªã¯[Railsãã¥ãŒããªã¢ã«](https://railstutorial.jp/)ã® [GitHub Codespaces](https://github.co.jp/features/codespaces) çšãã³ãã¬ãŒãã§ãã2022幎11æã«å
¬éããã[GitHubå
¬åŒã®Railsãã³ãã¬ãŒã](https://github.com/github/codespaces-rails)ãã[Railsãã¥ãŒããªã¢ã«](https://railstutorial.jp)çšã«ã«ã¹ã¿ãã€ãºãããã®ã§ãã
- [:computer: GitHub Codespaces 察å¿ïŒç°å¢æ§ç¯ãäžèŠã«ïŒè§£èª¬åç»ä»ãïŒ - note](https://note.com/yasslab/n/n427c56266295)
- [:newspaper: GitHub Codespaces ãå
šãŠãŒã¶ãŒã«ç¡ææäŸãžãæ¯æ60æéå - Publickey](https://www.publickey1.jp/blog/22/github_codespaces60jetbrainsjupyterlabide.html)
<br>
æ¬ãã³ãã¬ãŒãã¯ãRailsãã¥ãŒããªã¢ã«ã®ç¬¬1ç« ã»ç¬¬2ç« ã»ç¬¬3ç« ã®åé ã«ãã `rails new` ããã³ `Gemfile` ã®æŽæ°ãŸã§ïŒé£ãããšããããç°å¢æ§ç¯ããŸã§ïŒãå®äºããŠããç¶æ
ãšãªã£ãŠããã**rails server ãç«ã¡äžããããç¶æ
ããåŠç¿ãã¹ã¿ãŒãã§ããŸã** ðâš
![Codespaces ã®ãµã³ãã«ç»é¢](https://i.gyazo.com/b3af38fd1f8b2824791da9001a2bf6a0.png)
<!-- ![æ§ïŒCodespaces ã®ãµã³ãã«ç»é¢](https://i.gyazo.com/af23bec87ce2b3d79613e16883700ecf.png) -->
<br>
## å¿
èŠãªãã®
- [Chrome](https://www.google.com/intl/ja/chrome/browser/) ãªã©ã®ãã©ãŠã¶ïŒChrome ã ãšããå¿«é©ã«åäœããŸãïŒ
- [GitHub](https://github.co.jp/) ã®ã¢ã«ãŠã³ãïŒãããŸã ã§ããã°äºåã«äœæããŠãããŸãããïŒ
[![GitHub Top](https://i.gyazo.com/b5bad7bc8318837b67def1643a52b955.png)](https://github.co.jp/)
<br>
## Codespaces 䜿ãæ¹
以äžã®æé ã§ãCodespaces ãå©çšããç°å¢æ§ç¯ãè¡ããŸã ð
1. åœããŒãžã®äžéšã«ãã `Use this template` ãã `Create a new repository` ãã¯ãªãã¯ããŸãããã `Use this template` ã衚瀺ãããªãå Žåã¯ããã©ãŠã¶ã®æšªå¹
ãåºããŠã¿ãŸãããã
![æ¬ãªããžããªãããªããžããªãäœæããå Žé¢](https://i.gyazo.com/a483f77e8299ea6b5dd75795c793fb8b.png)
1. 移åããããŒãžã§ã`Repository name` ã«äœæããã¢ããªåã`Description` ã«ã¢ããªã®èª¬ææãå
¥åãã`Private` ãéžæããŠãªããžããªãéå
¬éã«èšå®ããŸããæåŸã« `Create repository from template` ãã¯ãªãã¯ãããšãæ°ãããªããžããªãäœæãããŸããïŒä»¥äžã¯ç¬¬1ç« ã® `hello_app` ãäœæããå Žåã®äŸã§ã)
![ãã³ãã¬ãŒããªããžããªã®äœæç»é¢](https://i.gyazo.com/2e0188742504ec559109ba35a6b3714d.png)
1. äœæãããªããžããªã«é£ãã ãã`Code` ãã `Codespaces` ã¿ãã«ç§»åãã`Create codespace on main` ãã¯ãªãã¯ããŸãã
![ãã³ãã¬ãŒããªããžããªãã Codespaces ãž](https://i.gyazo.com/17c40d8c1453de7a5db9d7ed6b603db6.png)
1. ç°å¢æ§ç¯ãå®äºããã®ãåŸ
ã¡ãŸãïŒïŒãïŒåã»ã©æãããŸãïŒ
![Codespaces ã®ç«ã¡äžãäžã®ç»é¢](https://i.gyazo.com/1dc81bccd2f416bc936cd60f348a6d7a.png)
1. Railsãã¥ãŒããªã¢ã«ã®ããŽç»åã衚瀺ããããå®æã§ã!
![Codespaces ã«ããç°å¢æ§ç¯ã®å®äºç»é¢Top](https://i.gyazo.com/b3af38fd1f8b2824791da9001a2bf6a0.png)
`rails new` ã `Gemfile` ã®æŽæ°ã`rails server` ãç«ã¡äžãããšãããŸã§ïŒé£ãããšããããç°å¢æ§ç¯ããçµãããšãããŸã§ïŒãå®äºããŠããç¶æ
ãªã®ã§ã**第1ç« ã»ç¬¬2ç« ã»ç¬¬3ç« ã®ã³ãŒããæžããšããããå§ããããŸã!** ðâš
äŸãã°ç¬¬1ç« ã®å Žåã¯ã[1.3.2 `rails server`](https://railstutorial.jp/chapters/beginning#sec-rails_server)ãã®éäžãããããªãã¡ `rails server` ãç«ã¡äžãããšããããã¹ã¿ãŒãã§ããŸãã
> :memo: Codespaces ã«ãã£ãŠã³ã³ãŸã§èªååãããŠããŸããã**1.3.2 以åã®å
容ïŒäœãèªååãããã®ãïŒãç¥ãããšã倧äº**ã§ãããã®ãŸãŸ 1.3.2 以éã«é²ããŠããã ããŠããã¡ãã倧äžå€«ã§ãããã©ããã®æ®µé㧠1.3.2 以åã®å
容ã«ãç®ãéããŠãããšãç¥èã¯åºãããŸãã
<br>
## ã€ã³ã¹ããŒã«æžã¿ã®æ¡åŒµæ©èœã«ã€ããŠ
ããè¯ãåŠç¿äœéšã«ç¹ãããããæ¬ãã³ãã¬ãŒãã«ã¯ä»¥äžã® VS Code æ¡åŒµæ©èœãããã©ã«ãã§å
¥ã£ãŠããŸãã
- [:octocat: Shopify/vscode-ruby-lsp](https://github.com/Shopify/vscode-ruby-lsp):
- Ruby ã³ãŒããè²åãããŠè¡šç€ºãããã€ã©ã€ãæ©èœããã³ãŒãè£å®æ©èœãªã©ã䜿ããŸãïŒä»¥äžã¯[å
¬åŒã®ãã¢åç»](https://github.com/Shopify/vscode-ruby-lsp#readme)ã§ãïŒ\
![Ruby LSP Official DEMO](https://i.gyazo.com/71a5c5114b7836d942a5145ca58eadb9.gif) \
åèèšäº: [Ruby LSPã®ã³ãŒãããã²ãŒã·ã§ã³ã§åŒ·åãããäž»ãªæ©èœ - TechRacho](https://techracho.bpsinc.jp/hachi8833/2024_07_29/143652)
- [:octocat: castwide/vscode-solargraph](https://github.com/castwide/vscode-solargraph):
- Ruby ã³ãŒãã®å®çŸ©å
ã調ã¹ãããã³ãŒããžã£ã³ãæ©èœããããã¥ã¡ã³ã衚瀺æ©èœãªã©ã䜿ããŸãïŒä»¥äžã¯[å
¬åŒã®ãã¢åç»](https://github.com/castwide/vscode-solargraph#readme)ã§ãïŒ \
![Solargraph Official DEMO](https://i.gyazo.com/5fac6a81088d814a5b8354431239b03d.gif)
RuboCop ã«ããã³ãŒãæŽåœ¢ãRuby å
¬åŒãããã¬ãŒãªã©ã®æ¡åŒµæ©èœã¯ã奜ã¿ã§è¿œå ããŠãã ãããæ¬ãã³ãã¬ãŒãã§ã¯å¿
èŠæäœéã®æ¡åŒµæ©èœã«çããŠããŸãã
- [:octocat: misogi/vscode-ruby-rubocop](https://github.com/misogi/vscode-ruby-rubocop)
- [:octocat: ruby/vscode-rdbg](https://github.com/ruby/vscode-rdbg)
- [:octocat: ruby-debug/ruby-debug-ide](https://github.com/ruby-debug/ruby-debug-ide)
- [:octocat: Shopify/vscode-shopify-ruby](https://github.com/Shopify/vscode-shopify-ruby)
- [:octocat: primer/github-vscode-theme](https://github.com/primer/github-vscode-theme)
<br>
## ãããããšã©ãŒãšè§£æ±ºæ¹æ³
<details>
<summary><strong>ãã©ãŠã¶å¥ã®ãšã©ãŒè§£æ±ºæ¹æ³ãèŠãïŒ2023幎3ææç¹ïŒ</strong></summary>
<h3>Google Chrome - Webãã¥ãŒã®èªã¿èŸŒã¿ãšã©ãŒ</h3>
<img src='https://i.gyazo.com/c59a5e4c331e5a513860bc118526378d.png)' alt='Chrome ã®ãšã©ãŒäŸïŒ' />
<p><code>Error: Could not register service workers: NotSupportedError ...</code> ãªã©ã衚瀺ããããã·ã³ãã«ãã©ãŠã¶ãŒã¯éãããã©äœã衚瀺ãããªãããšããå ŽåããããŸããããã¯å¿
èŠãª Cookie ãèš±å¯ãããŠããªãå Žåã«èµ·ãããŸãã以äžã®äŸãåèã«ããµãŒãããŒãã£ã® Cookie ãèš±å¯ãããšè§£æ±ºããå Žåãå€ãã§ãã</p>
<img src='https://i.gyazo.com/491d00e54d05da7d920816a2dbd53491.png' alt='Chrome ã®ãšã©ãŒäŸïŒ' />
<p>Cookie ãèš±å¯ããŠã解決ããªãå Žåã¯ãã·ã³ãã«ãã©ãŠã¶ãŒã®å³ç«¯ã«ããããã©ãŠã¶ãŒã§éããã¢ã€ã³ã³ãã¯ãªãã¯ããŠãã ããããã©ãŠã¶ã®å¥ã¿ãã§ç»é¢ã衚瀺ããããã¡ãã®ç»é¢ã§ãçŸåšã®ç¶æ
ãã確èªããã ããŸãã</p>
<img src='https://i.gyazo.com/289ea5dc51a0718161b59830c6e3d9ec.png' alt='Chrome ã®ãšã©ãŒäŸïŒ' />
<br><br><br>
<h3>Firefox - Webãã¥ãŒã®èªã¿èŸŒã¿ãšã©ãŒ</h3>
<p>äžèšã® Chrome ãšåæ§ã«ãã·ã³ãã«ãã©ãŠã¶ãŒã®ç»é¢ã衚瀺ãããªãäºããããŸããã¢ãã¬ã¹ããŒã«ãã匷ååãã©ããã³ã°é²æ¢æ©èœã®ã¢ã€ã³ã³ãã¯ãªãã¯ããããªããã«ããããšã§ãã¬ãã¥ãŒã衚瀺ãããããã«ãªããŸãã</p>
<img src='https://i.gyazo.com/7a73af24e1d7fde7ebb2ad00fe4bca0a.png' alt='Firefox ã®ãšã©ãŒäŸïŒ' />
<p>äžèšã®æ©èœããªãã«ããŠã解決ããªãå Žåã¯ãã·ã³ãã«ãã©ãŠã¶ãŒã§ã¯ãªããæ°èŠãŠã£ã³ããŠã§ãµã€ããéãããã¯ãªãã¯ããŠãã ããããã©ãŠã¶ã®å¥ã¿ãã§ç»é¢ã衚瀺ããããã¡ãã®ç»é¢ã§ãçŸåšã®ç¶æ
ãã確èªããã ããŸãã</p>
<img src='https://i.gyazo.com/488b1f6f090372bbafd7b5590d56acdd.png' alt='Firefox ã®ãšã©ãŒäŸïŒ' />
<img src='https://i.gyazo.com/8884a98fe667819d8730efeb905265eb.png' alt='Firefox ã®ãšã©ãŒäŸïŒ' />
<br><br><br>
<h3>Safari - å
¥åã®é
延ã»ã¢ã€ã³ã³ã®äžéšé衚瀺</h3>
<p>Safari ã§ã¯åé¡ãªãããšãå€ãã§ãããã ããæåå
¥åãããŠãããCodespaces äžã®ç»é¢ã«è¡šç€ºããããŸã§ãé
ãå ŽåããããŸãããŸãäžéšã®ã¢ã€ã³ã³ã衚瀺ãããªãçŸè±¡ã確èªã§ããŠããŸããéçºããäžã§åé¡ã«ãªãããã§ã¯ãªãã§ãããããæ°ã«ãªãå Žå㯠Google Chrome ãªã©ä»ã®ãã©ãŠã¶ããè©Šããã ããã</p>
<img src='https://i.gyazo.com/a74db22c2faba07a44af284a08f1f21b.png' alt='Safari ã®ãšã©ãŒäŸïŒ' />
</details>
<br><br>
## å¶äœã»ã©ã€ã»ã³ã¹
Copyright © [YassLab](http://yasslab.jp/) Inc.<br>
Railsãã¥ãŒããªã¢ã«éå¶ããŒã <br>
[https://railstutorial.jp/](https://railstutorial.jp/)
<small>
ãœãŒã¹ã³ãŒãã®ã©ã€ã»ã³ã¹ã¯ <a href='https://github.com/yasslab/codespaces-railstutorial/blob/main/LICENSE'>LICENSE</a> ãã確èªãã ããã<br>
ããŽç»åããã¢åç»ãªã©ã¯åå¶äœè
ã®èäœç©ãšãªããŸãã
</small>
", Assign "at most 3 tags" to the expected json: {"id":"9304","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"