Skip to content

OSS Gate Workshop: Osaka: 2026-09-13: Retasusan: rails-new: Work log #2118

Closed

Description

@Retasusan

This is a work log of a "OSS Gate workshop".
"OSS Gate workshop" is an activity to increase OSS developers.
Here's been discussed in Japanese. Thanks.

作業ログ作成時の説明

以下のテンプレートを埋めてタイトルに設定します。埋め方例はスクロールすると見えてきます。

OSS Gate Workshop: ${LOCATION}: ${YEAR}-${MONTH}-${DAY}: ${ACCOUNT_NAME}: ${OSS_NAME}: Work log

タイトル例↓:

OSS Gate Workshop: Tokyo: 2017-01-16: kou: Rabbit: Work log

OSS Gateワークショップ関連情報

  • スライド:ワークショップの進行に使っているスライドがあります。
  • チャット:OSS開発に関することならなんでも相談できます。ワークショップが終わった後もオンラインで相談しながら継続的にOSSの開発に参加しましょう!
  • シナリオ:ワークショップの目的・内容・進め方の詳細が書いています。
  • 過去のビギナーの作業ログ:他の人の作業ログから学べることがいろいろあるはずです。

Activity

  1. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    このrails-newのリポジトリをforkする

  2. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    fork先のリポジトリ

  3. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    起動の仕方が書いていないので、とりあえずcargo run ./src/main.rsとしてみる

  4. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    途中まで(Docker のpullまで?)はうまくいったが、途中でエラーになった

    cargo run ./src/main.rs
        Updating crates.io index
      Downloaded colorchoice v1.0.0
      Downloaded heck v0.4.1
      Downloaded clap_derive v4.5.0
      Downloaded utf8parse v0.2.1
      Downloaded clap_lex v0.7.0
      Downloaded strsim v0.11.0
      Downloaded anstream v0.6.13
      Downloaded anstyle-parse v0.2.3
      Downloaded anstyle v1.0.6
      Downloaded unicode-ident v1.0.12
      Downloaded users v0.11.0
      Downloaded log v0.4.21
      Downloaded clap v4.5.1
      Downloaded quote v1.0.35
      Downloaded proc-macro2 v1.0.78
      Downloaded clap_builder v4.5.1
      Downloaded anstyle-query v1.0.2
      Downloaded syn v2.0.52
      Downloaded libc v0.2.153
      Downloaded 19 crates (1.5MiB) in 0.41s
       Compiling proc-macro2 v1.0.78
       Compiling unicode-ident v1.0.12
       Compiling utf8parse v0.2.1
       Compiling libc v0.2.153
       Compiling anstyle v1.0.6
       Compiling colorchoice v1.0.0
       Compiling anstyle-query v1.0.2
       Compiling strsim v0.11.0
       Compiling anstyle-parse v0.2.3
       Compiling clap_lex v0.7.0
       Compiling heck v0.4.1
       Compiling log v0.4.21
       Compiling anstream v0.6.13
       Compiling clap_builder v4.5.1
       Compiling quote v1.0.35
       Compiling syn v2.0.52
       Compiling users v0.11.0
       Compiling clap_derive v4.5.0
       Compiling clap v4.5.1
       Compiling rails-new v0.5.0 (/Users/gotoukenta/ghq/github.com/Retasusan/rails-new)
        Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.59s
         Running `target/debug/rails-new ./src/main.rs`
    [+] Building 48.5s (7/7) FINISHED                                                                                               docker:desktop-linux
     => [internal] load build definition from Dockerfile                                                                                            0.0s
     => => transferring dockerfile: 549B                                                                                                            0.0s
     => [internal] load metadata for docker.io/library/ruby:latest                                                                                  3.2s
     => [internal] load .dockerignore                                                                                                               0.0s
     => => transferring context: 2B                                                                                                                 0.0s
     => [1/3] FROM docker.io/library/ruby:latest@sha256:8dc3950712ad2078bdd275b890419ba2fd3aab5a0653b291a7325f0d8a24ca05                           22.0s
     => => resolve docker.io/library/ruby:latest@sha256:8dc3950712ad2078bdd275b890419ba2fd3aab5a0653b291a7325f0d8a24ca05                            0.0s
     => => sha256:8dc3950712ad2078bdd275b890419ba2fd3aab5a0653b291a7325f0d8a24ca05 10.26kB / 10.26kB                                                0.0s
     => => sha256:0db3bdc898007126866cd9b2a186059557a9b1ec01548985d51ff2429fc7a907 2.31kB / 2.31kB                                                  0.0s
     => => sha256:3918e32e03bdc112dcdfe51a0c287943fac1275770dfa69a12876e7b835e2758 7.05kB / 7.05kB                                                  0.0s
     => => sha256:7f50a08a25277c02b8dfc99818a21e12083215981e0aa03cb07cb74c9116f205 49.70MB / 49.70MB                                                2.7s
     => => sha256:7fa3c72c6402ef534e043b1dca6fc0ab99e044c333c7679d2508eac3817a8570 25.03MB / 25.03MB                                               11.3s
     => => sha256:42fd700369b465b3f57ff668eea94fc0b0e67029df25a71600d2c522a452406d 67.60MB / 67.60MB                                               13.2s
     => => sha256:aa764f06969872033af6eed9ac02aa9c93e7ab8553fce36b92dc116408dd79ec 226.47MB / 226.47MB                                             11.3s
     => => extracting sha256:7f50a08a25277c02b8dfc99818a21e12083215981e0aa03cb07cb74c9116f205                                                       3.5s
     => => sha256:e0279594f5a1fbb4e6fb4df8cce4d7c6e57bd22a74c802000dd7ea6f4b03418e 190B / 190B                                                     11.6s
     => => sha256:523e51fa29d8106bc8d5254522a9fcd0679311a02a0665be20406a9f02cfaad9 49.65MB / 49.65MB                                               14.7s
     => => extracting sha256:7fa3c72c6402ef534e043b1dca6fc0ab99e044c333c7679d2508eac3817a8570                                                       0.7s
     => => sha256:ef7a62e04bd08f40b64d6bb9ba35af08e89357542989c35c38d6b680bdc5e6f5 144B / 144B                                                     12.0s
     => => extracting sha256:42fd700369b465b3f57ff668eea94fc0b0e67029df25a71600d2c522a452406d                                                       2.4s
     => => extracting sha256:aa764f06969872033af6eed9ac02aa9c93e7ab8553fce36b92dc116408dd79ec                                                       5.1s
     => => extracting sha256:e0279594f5a1fbb4e6fb4df8cce4d7c6e57bd22a74c802000dd7ea6f4b03418e                                                       0.0s
     => => extracting sha256:523e51fa29d8106bc8d5254522a9fcd0679311a02a0665be20406a9f02cfaad9                                                       0.9s
     => => extracting sha256:ef7a62e04bd08f40b64d6bb9ba35af08e89357542989c35c38d6b680bdc5e6f5                                                       0.0s
     => [2/3] RUN curl -sL https://deb.nodesource.com/setup_22.x | bash -   && apt-get update   && apt-get install --yes --no-install-recommends   12.0s
     => [3/3] RUN if [ -z "$RAILS_VERSION" ] ; then gem install rails ; else gem install rails -v $RAILS_VERSION ; fi                              10.4s 
     => exporting to image                                                                                                                          0.7s 
     => => exporting layers                                                                                                                         0.6s 
     => => writing image sha256:29f3eafe4cecc3b34372f459fd2fac77e35ad6c8d5b1b8115352c3997a5c06b1                                                    0.0s 
     => => naming to docker.io/library/rails-new-latest                                                                                             0.0s 
                                                                                                                                                         
    View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/zhona09orkwdfrejce5k3r3uk                                           
    
    What's next:
        View a summary of image vulnerabilities and recommendations → docker scout quickview 
           exist  
    /usr/local/lib/ruby/4.0.0/fileutils.rb:241:in 'Dir.chdir': Not a directory @ chdir_path - /Users/gotoukenta/ghq/github.com/Retasusan/rails-new/src/ma
    in.rs (Errno::ENOTDIR)
            from /usr/local/lib/ruby/4.0.0/fileutils.rb:241:in 'FileUtils.cd'
            from /usr/local/bundle/gems/railties-8.1.3.1/lib/rails/generators/app_base.rb:267:in 'Rails::Generators::AppBase#create_root'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/base.rb:609:in 'Rails::Generators::AppGenerator#create_root'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/command.rb:28:in 'Thor::Command#run'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/invocation.rb:134:in 'block in Thor::Invocation#invoke_all'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/invocation.rb:134:in 'Hash#each'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/invocation.rb:134:in 'Enumerable#map'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/invocation.rb:134:in 'Thor::Invocation#invoke_all'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/group.rb:243:in 'Thor::Group.dispatch'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/base.rb:585:in 'Thor::Base::ClassMethods#start'
            from /usr/local/bundle/gems/railties-8.1.3.1/lib/rails/commands/application/application_command.rb:28:in 'Rails::Command::ApplicationCommand#
    perform'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/command.rb:28:in 'Thor::Command#run'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
            from /usr/local/bundle/gems/railties-8.1.3.1/lib/rails/command/base.rb:176:in 'Rails::Command::Base#invoke_command'
            from /usr/local/bundle/gems/thor-1.5.0/lib/thor.rb:538:in 'Thor.dispatch'
            from /usr/local/bundle/gems/railties-8.1.3.1/lib/rails/command/base.rb:71:in 'Rails::Command::Base.perform'
            from /usr/local/bundle/gems/railties-8.1.3.1/lib/rails/command.rb:65:in 'block in Rails::Command.invoke'
            from /usr/local/bundle/gems/railties-8.1.3.1/lib/rails/command.rb:143:in 'Rails::Command.with_argv'
            from /usr/local/bundle/gems/railties-8.1.3.1/lib/rails/command.rb:63:in 'Rails::Command.invoke'
            from /usr/local/bundle/gems/railties-8.1.3.1/lib/rails/cli.rb:20:in '<top (required)>'
            from /usr/local/bundle/gems/railties-8.1.3.1/exe/rails:10:in 'Kernel#require'
            from /usr/local/bundle/gems/railties-8.1.3.1/exe/rails:10:in '<top (required)>'
            from /usr/local/lib/ruby/4.0.0/rubygems.rb:305:in 'Kernel#load'
            from /usr/local/lib/ruby/4.0.0/rubygems.rb:305:in 'Gem.activate_and_load_bin_path'
            from /usr/local/bundle/bin/rails:25:in '<main>'
    
    thread 'main' (30975033) panicked at src/main.rs:60:5:
    assertion failed: status.success()
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  5. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author
    • cargo run -- myappとしたら動いた
      • --がアプリケーションに引数を渡すらしい
  6. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    rails-new-aarch64-apple-darwin.tar.gz
    このリンクからGUIでダウンロードして、展開する

  7. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    ~/ghq/github.com/Retasusan/rails-newに配置して、rails-new myappしてみる

  8. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author
    $ ./rails-new myapp                       
    zsh: killed     ./rails-new myapp
    
  9. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author
    Image
  10. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    rails-newをcloneしたものを、cargo build --relaseでバイナリにし、./target/release/rails-new myappを実行する

  11. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    成功した

  12. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    curl -fLO https://github.com/rails/rails-new/releases/download/v0.5.0/rails-new-aarch64-apple-darwin.tar.gz
    これでダウンロードして
    tar -xzf rails-new-aarch64-apple-darwin.tar.gz
    これで展開したら警告が出ることなく、成功した

  13. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    rails/rails-new#64
    とりあえず、issueは出せました

  14. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author

    振り返り

    • 一人だと一般的なのかわからない挙動に遭遇した時に聞くことができて助かりました
    • こういうことをする、まとまった時間を取ることができてよかったです
    • issueを出せてよかった

    まだできそうなこと

    • 開発者用のドキュメント拡充
    • 設定ファイルとその読み込み機能の作成
  15. Retasusan commented on Sep 13, 2026

    @Retasusan
    Author
    • 設定ファイルとその読み込み機能の作成のDraft PRを作成しました
      • 現状のrails-newがRubyバージョンなどがデフォルト値以外で作成したい場合には、オプションで値を渡す必要がある
      • なので、コンフィグファイルに自分で設定した値を入れられるようにしたいというモチベーションがあった
      • そのため、コンフィグファイルにオプションやバージョンを指定できるようにするようにした
  16. github-actions commented on Sep 14, 2026

    @github-actions

    おつかれさまでした!

    ワークショップの終了にともないissueを閉じますが、このまま作業メモとして使っても構いません 👌

    ワークショップの感想を集めています!

    ブログなどに書かれた際は、このページへリンクの追加をお願いします 🙏

    またの参加をお待ちしています!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    work logワークショップ作業メモ

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions