0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Railsのインストールでつまづいたこと(原因はONEDRIVE)

Last updated at Posted at 2021-09-09

もう腹が立って仕方がない

結局は個人のデスクトップフォルダが、知らない間にOnedriveにリンクされていて、
権限の関係でインストールが出来なかったからである。

それにしても、腹が立つ・・・

以下の環境はどちらも駄目だった。

  • WSL/Ubuntu
  • MYSYS2/MinGW

デスクトップフォルダ

ずいぶん前は
C:\Users\motoc\デスクトップ\rails

最近、こうなっている
C:\Users\motoc\OneDrive\デスクトップ\rails

知らない間に、こんなクソ仕様にしやがって・・・

しばいたろか!

#フォルダ

C:\Users\motoc\OneDrive\デスクトップ\rails

motoc@DESKTOP-5GGB0DP MINGW64 ~
$ cmd.exe /c "chcp 65001"
Active code page: 65001

motoc@DESKTOP-5GGB0DP MINGW64 ~
$ cmd.exe /c "mklink /j rails C:\Users\motoc\OneDrive\デスクトップ\rails"
Junction created for rails <<===>> C:\Users\motoc\OneDrive\デスクトップ\rails

#エラー内容

$ bin/rails s
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.8.1/lib/bootsnap/compile_cache/iseq.rb:30:in `fetch': No such file or directory - bs_fetch:open_current_file:open (Errno::ENOENT)
        from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/bootsnap-1.8.1/lib/bootsnap/compile_cache/iseq.rb:30:in `fetch'
... 省略

#解決方法

下記のフォルダに変更

C:\Users\motoc\rails

motoc@DESKTOP-5GGB0DP MINGW64 ~
$ cmd.exe /c "mklink /j rails C:\Users\motoc\rails"
Junction created for rails <<===>> C:\Users\motoc\rails

無事に動いた

motoc@DESKTOP-5GGB0DP MINGW64 ~/rails/railsample
$ bin/rails s
=> Booting Puma
=> Rails 5.2.6 application starting in development
=> Run `rails server -h` for more startup options
*** SIGUSR2 not implemented, signal based restart unavailable!
*** SIGUSR1 not implemented, signal based restart unavailable!
*** SIGHUP not implemented, signal based logs reopening unavailable!
Puma starting in single mode...
* Version 3.12.6 (ruby 2.6.8-p205), codename: Llamas in Pajamas
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Use Ctrl-C to stop
Started GET "/" for ::1 at 2021-09-09 10:41:43 +0900
Processing by Rails::WelcomeController#index as HTML
  Rendering C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/templates/rails/welcome/index.html.erb
  Rendered C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/railties-5.2.6/lib/rails/templates/rails/welcome/index.html.erb (7.3ms)
Completed 200 OK in 32ms (Views: 25.0ms | ActiveRecord: 0.0ms)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?