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?

Rails のプロジェクトを仮想環境(Linux)で git clone する際の注意点

Last updated at Posted at 2025-02-04

仮想環境(Linux)でのRailsの環境構築で躓いた

仕事でRubyMineを使用している

RubyMineではアプリを開く際にプロジェクトを指定しないと、開くことができない。

そのため、プロジェクトのディレクトリを作成していないとコンソールを使用することができない。

私はそれを面倒くさがって、 Windows のコマンドプロンプトで git clone をして、仮想環境でプロジェクトを触ろうと思ったら下記のエラーが出た。

/usr/bin/env: ‘ruby\r’: No such file or directory

これは、異なるOS間での改行コード問題らしい(下記URL参照)
https://qiita.com/sachiotomita/items/e50cd99d1b9b4c25eef8

つまり私は、Windowsのコマンドプロンプトで clone して、 Linux の仮想環境で操作するという、異なるOSでの作業をしていたため、先ほどのようなエラーが起きたと考えられる。

ちなみに、 Ubuntu で clone し直したら、この問題は解決した。

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?