konchanxxx / menta

MENTAのタスク管理用リポジトリ
0 stars 0 forks source link

タスクモデルのひな型を作成時に発生するエラーについて #34

Closed RYUTAONO0929 closed 5 years ago

RYUTAONO0929 commented 5 years ago

概要

rails g moel [モデル名] [属性][オプション]でモデルを作成するときにエラーが出ます。 http://app.road.jp.net/?p=1679 こんなことや↑ http://app.road.jp.net/?p=1679 こんなこと↑ を試したのですが `initialize': Permission denied となりモデル作成できません。 前回もパーミッションの関係でエラーが発生したのでこれから同じような事を繰り返さないように対策や読んでおいた方が良いものも教えていただけると幸いです。

実現したいこと

現場で使えるRails 3-2-2 p94

困っていること

困っていることがバグの場合は事象やログ、エラーメッセージをできるだけそのまま(抜粋などしない)下記に記載してください。


ryutaono@DESKTOP-G6D20US:~/taskleaf$ bin/rails g model Task name:string description:text
/home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:194:in `initialize': Permission denied @ dir_initialize - /home/ryutaono/taskleaf/app/assets/config/initializers (Errno::EACCES)
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:194:in `new'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:194:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:204:in `block in watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:204:in `block in watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:204:in `block in watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:204:in `block in watch'
ryutaono@DESKTOP-G6D20US:~/taskleaf$    from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/linux.rb:32:in `_configure'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:45:in `block in configure'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `configure'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:63:in `start'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/listener.rb:68:in `block in <class:Listener>'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `instance_eval'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `call'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/fsm.rb:91:in `transition_with_callbacks!'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/fsm.rb:57:in `transition'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/listener.rb:91:in `start'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-watcher-listen-2.0.1/lib/spring/watcher/listen.rb:27:in `start'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:80:in `start_watcher'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:89:in `preload'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from -e:1:in `<main>'
^C
ryutaono@DESKTOP-G6D20US:~/taskleaf$ spring stop
Spring stopped.
ryutaono@DESKTOP-G6D20US:~/taskleaf$ bin/spring
Version: 2.0.2

Usage: spring COMMAND [ARGS]

Commands for spring itself:

  binstub         Generate spring based binstubs. Use --all to generate a binstub for all known commands. Use --remove to revert.
  help            Print available commands.
  server          Explicitly start a Spring server in the foreground
  status          Show current status.
  stop            Stop all spring processes for this project.

Commands for your application:

  rails           Run a rails command. The following sub commands will use spring: console, runner, generate, destroy, test.
  rake            Runs the rake command
ryutaono@DESKTOP-G6D20US:~/taskleaf$ bin/rails g model Task name:string description:text
/home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:194:in `initialize': Permission denied @ dir_initialize - /home/ryutaono/taskleaf/app/assets/config/initializers (Errno::EACCES)
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:194:in `new'
ryutaono@DESKTOP-G6D20US:~/taskleaf$    from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:194:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:204:in `block in watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:204:in `block in watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:204:in `block in watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:204:in `block in watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.10.0/lib/rb-inotify/notifier.rb:196:in `watch'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/linux.rb:32:in `_configure'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:45:in `block in configure'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `each'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:40:in `configure'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/adapter/base.rb:63:in `start'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/listener.rb:68:in `block in <class:Listener>'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `instance_eval'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/fsm.rb:121:in `call'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/fsm.rb:91:in `transition_with_callbacks!'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/fsm.rb:57:in `transition'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/listen-3.1.5/lib/listen/listener.rb:91:in `start'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-watcher-listen-2.0.1/lib/spring/watcher/listen.rb:27:in `start'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:80:in `start_watcher'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:89:in `preload'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from -e:1:in `<main>'
^C
ryutaono@DESKTOP-G6D20US:~/taskleaf$ ls -al
total 16
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 13:38 .
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 ..
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 13:38 .bundle
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 .git
-rwxr-xr-x 1 ryutaono ryutaono  620 Feb 16 17:12 .gitignore
-rwxr-xr-x 1 ryutaono ryutaono    5 Feb 16 17:12 .ruby-version
-rwxr-xr-x 1 ryutaono ryutaono 2265 Feb 16 17:57 Gemfile
-rwxr-xr-x 1 ryutaono ryutaono 5821 Feb 18 09:34 Gemfile.lock
-rwxr-xr-x 1 ryutaono ryutaono  374 Feb 16 17:12 README.md
-rwxr-xr-x 1 ryutaono ryutaono  227 Feb 16 17:12 Rakefile
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 app
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 bin
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 config
-rwxr-xr-x 1 ryutaono ryutaono  130 Feb 16 17:12 config.ru
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 db
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 lib
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:14 log
-rwxr-xr-x 1 ryutaono ryutaono   66 Feb 16 17:12 package.json
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 public
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 storage
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 test
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:14 tmp
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 14:03 vendor
ryutaono@DESKTOP-G6D20US:~/taskleaf$ chmod -R 755 ./taskleaf
chmod: cannot access './taskleaf': No such file or directory

解決するために行ったこと

springの再起動

問題となっている箇所の予想

initializeのパーミッションの問題

問題となっているアプリケーションのGitHub URL

RYUTAONO0929 commented 5 years ago

エラーが発生する数が多く、ご迷惑をおかけする頻度が多いので、Linux まわりで発生するエラーに自分で対処できるようになりたく、対策をお教え願えると幸いです。

konchanxxx commented 5 years ago

くぅ〜 rbenv がルートユーザー権限とかでインストールされている気がしますね

$ ls -la ~/

したらどうなりますか?

.rbenv というディレクトリが存在したら

$ sudo chown -R ryutaono:ryutaono ~/.rbenv

とかして欲しいです。.rbenvディレクトリの所有者とグループをryutaonoに再帰的に変更するというコマンドです。

RYUTAONO0929 commented 5 years ago


ryutaono@DESKTOP-G6D20US:~/taskleaf$ ls -la ~/
total 16
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 .
drwxr-xr-x 1 root     root     4096 Feb 14 18:30 ..
-rw------- 1 ryutaono ryutaono 6130 Feb 18 17:55 .bash_history
-rw-r--r-- 1 ryutaono ryutaono  220 Feb 14 18:30 .bash_logout
-rw-r--r-- 1 ryutaono ryutaono 3891 Feb 15 16:21 .bashrc
drwxrwxrwx 1 ryutaono ryutaono 4096 Feb 16 08:39 .bundle
drwxrwxrwx 1 ryutaono ryutaono 4096 Feb 16 08:14 .gem
-rw-rw-rw- 1 ryutaono ryutaono   19 Feb 16 08:14 .gemrc
-rw-r--r-- 1 ryutaono ryutaono  807 Feb 14 18:30 .profile
-rw------- 1 ryutaono ryutaono    3 Feb 16 11:35 .psql_history
drwxrwxrwx 1 ryutaono ryutaono 4096 Feb 16 08:14 .rbenv
-rw-r--r-- 1 ryutaono ryutaono    0 Feb 14 18:31 .sudo_as_admin_successful
-rw-rw-rw- 1 ryutaono ryutaono  173 Feb 16 11:14 .wget-hsts
lrwxrwxrwx 1 ryutaono ryutaono   11 Feb 15 16:16 Code -> /mnt/c/Code
drwxrwxrwx 1 ryutaono ryutaono 4096 Feb 16 11:37 scaffold_app
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 13:38 taskleaf
ryutaono@DESKTOP-G6D20US:~/taskleaf$ sudo chown -R ryutaono:ryutaono ~/.rbenv
[sudo] password for ryutaono:
ryutaono@DESKTOP-G6D20US:~/taskleaf$```
RYUTAONO0929 commented 5 years ago

$ sudo chown -R ryutaono:ryutaono ~/.rbenv してみました

RYUTAONO0929 commented 5 years ago

その後bin/rails g model~を入力したのですが、同じエラーが出ます。(泣)

ryutaono@DESKTOP-G6D20US:~/taskleaf$ sudo chown -R ryutaono:ryutaono ~/.rbenv
[sudo] password for ryutaono:
ryutaono@DESKTOP-G6D20US:~/taskleaf$ bin/rails g model Task name:string description:text
/home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/dsl.rb:544:in `read': Permission denied @ rb_sysopen - /home/ryutaono/taskleaf/Gemfile (Errno::EACCES)
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/dsl.rb:544:in `contents'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/dsl.rb:574:in `to_s'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/setup.rb:12:in `message'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/setup.rb:12:in `rescue in <top (required)>'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/setup.rb:9:in `<top (required)>'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/commands.rb:33:in `<module:Spring>'
ryutaono@DESKTOP-G6D20US:~/taskleaf$    from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/commands.rb:4:in `<top (required)>'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:87:in `preload'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:153:in `serve'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
        from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
        from -e:1:in `<main>'
^C
ryutaono@DESKTOP-G6D20US:~/taskleaf$
konchanxxx commented 5 years ago

下記のコマンドをそれぞれ実行したらどうなりますか?

$ rbenv --version
$ bundler -v
$ ruby -v
$ rails -v
$ ls -la /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems
RYUTAONO0929 commented 5 years ago

こんなかんじです。 railsに問題があるのでしょうか。

ryutaono@DESKTOP-G6D20US:~/taskleaf$ rbenv --version
rbenv 1.1.1-39-g59785f6
ryutaono@DESKTOP-G6D20US:~/taskleaf$ bundler -v
Bundler version 2.0.1
ryutaono@DESKTOP-G6D20US:~/taskleaf$ ruby -v
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]
ryutaono@DESKTOP-G6D20US:~/taskleaf$ rails -v
/home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/ryutaono/.rbenv/versions in PATH, mode 040777
Traceback (most recent call last):
        22: from bin/rails:3:in `<main>'
        21: from bin/rails:3:in `load'
        20: from /home/ryutaono/taskleaf/bin/spring:15:in `<top (required)>'
        19: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
        18: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
        17: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
        16: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
        15: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
        14: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
        13: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
        12: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
        11: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
        10: from /home/ryutaono/taskleaf/bin/rails:8:in `<top (required)>'
         9: from /home/ryutaono/taskleaf/bin/rails:8:in `require_relative'
         8: from /home/ryutaono/taskleaf/config/boot.rb:3:in `<top (required)>'
         7: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
         6: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
         5: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/setup.rb:9:in `<top (required)>'
         4: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/setup.rb:12:in `rescue in <top (required)>'
         3: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/setup.rb:12:in `message'
         2: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/dsl.rb:574:in `to_s'
         1: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/dsl.rb:544:in `contents'
/home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/dsl.rb:544:in `read': Permission denied @ rb_sysopen - /home/ryutaono/taskleaf/Gemfile (Errno::EACCES)
ryutaono@DESKTOP-G6D20US:~/taskleaf$ ls -la /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems
total 0
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 08:12 .
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 08:12 ..
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 2.5.0
ryutaono@DESKTOP-G6D20US:~/taskleaf$
konchanxxx commented 5 years ago

権限設定がやはりおかしい感じになってそうですね

$ which ruby
$ rbenv uninstall 2.5.0
$ rbenv install 2.5.0
$ exec $SHELL -l
$ rbenv global 2.5.0
$ gem install rails
$ rails -v

を順番に実行したらどうなりますかね?

RYUTAONO0929 commented 5 years ago

$ rbenv uninstall 2.5.0で間違えてNoを押してしまいました

konchanxxx commented 5 years ago

もう1回やれば大丈夫です:bow:

RYUTAONO0929 commented 5 years ago
ryutaono@DESKTOP-G6D20US:~$ cd taskleaf
ryutaono@DESKTOP-G6D20US:~/taskleaf$ which ruby
ryutaono@DESKTOP-G6D20US:~/taskleaf$ rbenv uninstall 2.5.0
rbenv: remove /home/ryutaono/.rbenv/versions/2.5.0? [yN] y
ryutaono@DESKTOP-G6D20US:~/taskleaf$ rbenv install 2.5.0
Downloading ruby-2.5.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0.tar.bz2
Installing ruby-2.5.0...
RYUTAONO0929 commented 5 years ago

rbev install で止まっています。 時間がかかるinstallなのでしょうか。

konchanxxx commented 5 years ago

rbenv install はちょっと時間かかりますね

RYUTAONO0929 commented 5 years ago

了解です。 少し待ってみます。 夜分遅くに申し訳ありません。

RYUTAONO0929 commented 5 years ago
ryutaono@DESKTOP-G6D20US:~$ cd taskleaf
ryutaono@DESKTOP-G6D20US:~/taskleaf$ which ruby
ryutaono@DESKTOP-G6D20US:~/taskleaf$ rbenv uninstall 2.5.0
rbenv: remove /home/ryutaono/.rbenv/versions/2.5.0? [yN] y
ryutaono@DESKTOP-G6D20US:~/taskleaf$ rbenv install 2.5.0
Downloading ruby-2.5.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0.tar.bz2
Installing ruby-2.5.0...

Installed ruby-2.5.0 to /home/ryutaono/.rbenv/versions/2.5.0

ryutaono@DESKTOP-G6D20US:~/taskleaf$
ryutaono@DESKTOP-G6D20US:~/taskleaf$ exec $SHELL -l
ryutaono@DESKTOP-G6D20US:~/taskleaf$ rbenv global 2.5.0
ryutaono@DESKTOP-G6D20US:~/taskleaf$ gem install rails
Fetching: concurrent-ruby-1.1.4.gem (100%)
Successfully installed concurrent-ruby-1.1.4
Fetching: i18n-1.5.3.gem (100%)

HEADS UP! i18n 1.1 changed fallbacks to exclude default locale.
But that may break your application.

Please check your Rails app for 'config.i18n.fallbacks = true'.
If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be
'config.i18n.fallbacks = [I18n.default_locale]'.
If not, fallbacks will be broken in your app by I18n 1.1.x.

For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0

Successfully installed i18n-1.5.3
Fetching: thread_safe-0.3.6.gem (100%)
Successfully installed thread_safe-0.3.6
Fetching: tzinfo-1.2.5.gem (100%)
Successfully installed tzinfo-1.2.5
Fetching: activesupport-5.2.2.gem (100%)
Successfully installed activesupport-5.2.2
Fetching: rack-2.0.6.gem (100%)
/home/ryutaono/.rbenv/rbenv.d/exec/gem-rehash/rubygems_plugin.rb:6: warning: Insecure world writable dir /home/ryutaono/.rbenv/versions in PATH, mode 040777
Successfully installed rack-2.0.6
Fetching: rack-test-1.1.0.gem (100%)
Successfully installed rack-test-1.1.0
Fetching: mini_portile2-2.4.0.gem (100%)
Successfully installed mini_portile2-2.4.0
Fetching: nokogiri-1.10.1.gem (100%)
Building native extensions. This could take a while...
Successfully installed nokogiri-1.10.1
Fetching: crass-1.0.4.gem (100%)
Successfully installed crass-1.0.4
Fetching: loofah-2.2.3.gem (100%)
Successfully installed loofah-2.2.3
Fetching: rails-html-sanitizer-1.0.4.gem (100%)
Successfully installed rails-html-sanitizer-1.0.4
Fetching: rails-dom-testing-2.0.3.gem (100%)
Successfully installed rails-dom-testing-2.0.3
Fetching: builder-3.2.3.gem (100%)
Successfully installed builder-3.2.3
Fetching: erubi-1.8.0.gem (100%)
Successfully installed erubi-1.8.0
Fetching: actionview-5.2.2.gem (100%)
Successfully installed actionview-5.2.2
Fetching: actionpack-5.2.2.gem (100%)
Successfully installed actionpack-5.2.2
Fetching: activemodel-5.2.2.gem (100%)
Successfully installed activemodel-5.2.2
Fetching: arel-9.0.0.gem (100%)
Successfully installed arel-9.0.0
Fetching: activerecord-5.2.2.gem (100%)
Successfully installed activerecord-5.2.2
Fetching: globalid-0.4.2.gem (100%)
Successfully installed globalid-0.4.2
Fetching: activejob-5.2.2.gem (100%)
Successfully installed activejob-5.2.2
Fetching: mini_mime-1.0.1.gem (100%)
Successfully installed mini_mime-1.0.1
Fetching: mail-2.7.1.gem (100%)
Successfully installed mail-2.7.1
Fetching: actionmailer-5.2.2.gem (100%)
Successfully installed actionmailer-5.2.2
Fetching: nio4r-2.3.1.gem (100%)
Building native extensions. This could take a while...

Successfully installed nio4r-2.3.1
Fetching: websocket-extensions-0.1.3.gem (100%)
Successfully installed websocket-extensions-0.1.3
Fetching: websocket-driver-0.7.0.gem (100%)
Building native extensions. This could take a while...
Successfully installed websocket-driver-0.7.0
Fetching: actioncable-5.2.2.gem (100%)
Successfully installed actioncable-5.2.2
Fetching: mimemagic-0.3.3.gem (100%)
Successfully installed mimemagic-0.3.3
Fetching: marcel-0.3.3.gem (100%)
Successfully installed marcel-0.3.3
Fetching: activestorage-5.2.2.gem (100%)
Successfully installed activestorage-5.2.2
Fetching: thor-0.20.3.gem (100%)
Successfully installed thor-0.20.3
Fetching: method_source-0.9.2.gem (100%)
Successfully installed method_source-0.9.2
Fetching: railties-5.2.2.gem (100%)
Successfully installed railties-5.2.2
Fetching: bundler-2.0.1.gem (100%)
Successfully installed bundler-2.0.1
Fetching: sprockets-3.7.2.gem (100%)
Successfully installed sprockets-3.7.2
Fetching: sprockets-rails-3.2.1.gem (100%)
Successfully installed sprockets-rails-3.2.1
Fetching: rails-5.2.2.gem (100%)
Successfully installed rails-5.2.2
39 gems installed
ryutaono@DESKTOP-G6D20US:~/taskleaf$
ryutaono@DESKTOP-G6D20US:~/taskleaf$ rails -v
/home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/ryutaono/.rbenv/versions in PATH, mode 040777
Traceback (most recent call last):
        22: from bin/rails:3:in `<main>'
        21: from bin/rails:3:in `load'
        20: from /home/ryutaono/taskleaf/bin/spring:15:in `<top (required)>'
        19: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
        18: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:70:in `require'
        17: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
        16: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
        15: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
        14: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
        13: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
        12: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
        11: from /home/ryutaono/taskleaf/vendor/bundle/ruby/2.5.0/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
        10: from /home/ryutaono/taskleaf/bin/rails:8:in `<top (required)>'
         9: from /home/ryutaono/taskleaf/bin/rails:8:in `require_relative'
         8: from /home/ryutaono/taskleaf/config/boot.rb:3:in `<top (required)>'
         7: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
         6: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
         5: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/setup.rb:9:in `<top (required)>'
         4: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/setup.rb:12:in `rescue in <top (required)>'
         3: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/setup.rb:12:in `message'
         2: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/dsl.rb:574:in `to_s'
         1: from /home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/dsl.rb:544:in `contents'
/home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/lib/bundler/dsl.rb:544:in `read': Permission denied @ rb_sysopen - /home/ryutaono/taskleaf/Gemfile (Errno::EACCES)
ryutaono@DESKTOP-G6D20US:~/taskleaf$
RYUTAONO0929 commented 5 years ago

こんな感じです。

RYUTAONO0929 commented 5 years ago

近藤様

御指導頂いている身で大変恐縮なのですが、御指導頂ける時間を日本時間で良いので事前に御連絡いただけないでしょうか。 今の状態では一日の計画を立て辛く、日がな一日通知を待っている次第です。 御仕事やプライベートの御関係上、御時間の把握が困難なようでしたら申し訳ありません。 どうぞ宜しくお願い致します。

小野竜太

konchanxxx commented 5 years ago
$ chmod 755 /home/ryutaono/.rbenv/versions

でディレクトリの権限変更したらどうなりますか?

御仕事やプライベートの御関係上、御時間の把握が困難なようでしたら申し訳ありません。

すいません。こちらは確約できないです。フルコミットして本業としてやっているわけではなく、空き時間で対応しているためです。そのため月2000円です:bow:ご了承ください。

今の状態では一日の計画を立て辛く、日がな一日通知を待っている次第です。

こちらは待たなくても他の書籍、コンテンツも並行して進めることで対応できるかなと思いますがいかがでしょうか?

konchanxxx commented 5 years ago

あと

$ ls -la /home/ryutaono/taskleaf

でディレクトリ情報を出力してほしいです。

RYUTAONO0929 commented 5 years ago

大変失礼致しました。 空き時間はオブジェクト指向の本を進めていきたいと思います。

ryutaono@DESKTOP-G6D20US:~/taskleaf$ chmod 755 /home/ryutaono/.rbenv/versions
ryutaono@DESKTOP-G6D20US:~/taskleaf$ ls -la /home/ryutaono/taskleaf
total 16
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 13:38 .
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 ..
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 13:38 .bundle
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 .git
-rwxr-xr-x 1 ryutaono ryutaono  620 Feb 16 17:12 .gitignore
-rwxr-xr-x 1 ryutaono ryutaono    5 Feb 16 17:12 .ruby-version
---------- 1 ryutaono ryutaono 2265 Feb 18 09:34 Gemfile
-rwxr-xr-x 1 ryutaono ryutaono 5821 Feb 18 09:34 Gemfile.lock
-rwxr-xr-x 1 ryutaono ryutaono  374 Feb 16 17:12 README.md
-rwxr-xr-x 1 ryutaono ryutaono  227 Feb 16 17:12 Rakefile
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 app
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 bin
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 config
-rwxr-xr-x 1 ryutaono ryutaono  130 Feb 16 17:12 config.ru
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 db
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 lib
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:14 log
-rwxr-xr-x 1 ryutaono ryutaono   66 Feb 16 17:12 package.json
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 public
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 storage
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 test
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:14 tmp
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 14:03 vendor
ryutaono@DESKTOP-G6D20US:~/taskleaf$
RYUTAONO0929 commented 5 years ago

出力はこんな感じです

konchanxxx commented 5 years ago

大変失礼致しました。 空き時間はオブジェクト指向の本を進めていきたいと思います。

いえいえ、すみません。ご了承願います:bow:

---------- 1 ryutaono ryutaono 2265 Feb 18 09:34 Gemfile

Gemfileだけ ---------- となっており権限設定されていないですね

chmod -R 755 /home/ryutaono/taskleaf

としたらどうなりますかね?

RYUTAONO0929 commented 5 years ago
ryutaono@DESKTOP-G6D20US:~/taskleaf$ chmod -R 755 /home/ryutaono/taskleaf
ryutaono@DESKTOP-G6D20US:~/taskleaf$
RYUTAONO0929 commented 5 years ago

こんな感じです。

konchanxxx commented 5 years ago
$ cd ~/taskleaf
$ ls -la .
$ rails -v

したらどうでしょう?

RYUTAONO0929 commented 5 years ago
ryutaono@DESKTOP-G6D20US:~/taskleaf$ cd ~/taskleaf
ryutaono@DESKTOP-G6D20US:~/taskleaf$ ls -la .
total 16
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 13:38 .
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 ..
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 13:38 .bundle
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 .git
-rwxr-xr-x 1 ryutaono ryutaono  620 Feb 16 17:12 .gitignore
-rwxr-xr-x 1 ryutaono ryutaono    5 Feb 16 17:12 .ruby-version
-rwxr-xr-x 1 ryutaono ryutaono 2265 Feb 18 09:34 Gemfile
-rwxr-xr-x 1 ryutaono ryutaono 5821 Feb 18 09:34 Gemfile.lock
-rwxr-xr-x 1 ryutaono ryutaono  374 Feb 16 17:12 README.md
-rwxr-xr-x 1 ryutaono ryutaono  227 Feb 16 17:12 Rakefile
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 app
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 bin
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 config
-rwxr-xr-x 1 ryutaono ryutaono  130 Feb 16 17:12 config.ru
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 db
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 lib
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:14 log
-rwxr-xr-x 1 ryutaono ryutaono   66 Feb 16 17:12 package.json
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 public
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 storage
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:12 test
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 16 17:14 tmp
drwxr-xr-x 1 ryutaono ryutaono 4096 Feb 17 14:03 vendor
ryutaono@DESKTOP-G6D20US:~/taskleaf$ rails -v
/home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/ryutaono/.rbenv in PATH, mode 040777
Rails 5.2.2
ryutaono@DESKTOP-G6D20US:~/taskleaf$
RYUTAONO0929 commented 5 years ago

railsのバージョンが確認できるようになりました。

konchanxxx commented 5 years ago

おお、よかったです。 これでrails g modelが実行できる気がします。

あとまだwarning出てるので

$ chmod 755 -R /home/ryutaono/.rbenv
$ rails -v

してみてください。

RYUTAONO0929 commented 5 years ago
ryutaono@DESKTOP-G6D20US:~/taskleaf$ chmod 755 -R /home/ryutaono/.rbenv
ryutaono@DESKTOP-G6D20US:~/taskleaf$ rails -v
/home/ryutaono/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/railties-5.2.2/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /mnt/c in PATH, mode 040777
Rails 5.2.2
ryutaono@DESKTOP-G6D20US:~/taskleaf$
RYUTAONO0929 commented 5 years ago

未だwarningでてます。(泣)

konchanxxx commented 5 years ago
warning: Insecure world writable dir /mnt/c

のdirの後の部分が権限不正状態のディレクトリなので warningが出る場合は

$ chmod 755 -R ディレクトリ名

# 例えば
$ chmod 755 -R /mnt/c

で変更していけば解消すると思います:bow:

RYUTAONO0929 commented 5 years ago
ryutaono@DESKTOP-G6D20US:~/taskleaf$ chmod 755 -R /mnt/c
chmod: cannot read directory '/mnt/c/$RECYCLE.BIN/S-1-5-18': Permission denied
chmod: cannot access '/mnt/c/$RECYCLE.BIN/S-1-5-21-1414543648-3536914589-2077870530-1001/.����00020000000a34f9f1e810a56094d18e': No such file or directory
chmod: cannot access '/mnt/c/$RECYCLE.BIN/S-1-5-21-1414543648-3536914589-2077870530-1001/.����00020000000a358417c1e51790a39aa1': No such file or directory
chmod: cannot access '/mnt/c/$RECYCLE.BIN/S-1-5-21-1414543648-3536914589-2077870530-1001/.����00020000000a35afd56ae6179e777be2': No such file or directory
chmod: cannot access '/mnt/c/$RECYCLE.BIN/S-1-5-21-1414543648-3536914589-2077870530-1001/.����00020000000a362edd50a72ab4668b33': No such file or directory
chmod: cannot access '/mnt/c/$RECYCLE.BIN/S-1-5-21-1414543648-3536914589-2077870530-1001/.����0004000000031a8dfc2ad7776735da51': No such file or directory
chmod: cannot access '/mnt/c/$RECYCLE.BIN/S-1-5-21-1414543648-3536914589-2077870530-1001/.����0004000000031aa5b9432fd4148d57da': No such file or directory
chmod: cannot access '/mnt/c/$RECYCLE.BIN/S-1-5-21-1414543648-3536914589-2077870530-1001/.����0004000000031b0d3b552f38f83b6197': No such file or directory
chmod: cannot read directory '/mnt/c/$RECYCLE.BIN/S-1-5-21-1414543648-3536914589-2077870530-500': Permission denied
chmod: cannot read directory '/mnt/c/$RECYCLE.BIN/S-1-5-21-2409220495-1712889377-3196228715-500': Permission denied
chmod: changing permissions of '/mnt/c/$SysReset/Scratch/csrss.exe': Permission denied
chmod: changing permissions of '/mnt/c/BOOTNXT': Permission denied
chmod: cannot read directory '/mnt/c/Config.Msi': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/bin/vagrant.exe': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/bin/curl.exe': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/bin/vcruntime140.dll': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/cacert.pem': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/DIR_COLORS': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/gemrc': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/krb5/krb5.conf': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/pkcs11/pkcs11.conf.example': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/pki/ca-trust/extracted/java/cacerts': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/pki/ca-trust/extracted/pem/email-ca-bundle.pem': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/pki/ca-trust/extracted/pem/objsign-ca-bundle.pem': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/profile.d/perlbin.csh': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/profile.d/perlbin.sh': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/ssh/moduli': Permission denied
chmod: changing permissions of '/mnt/c/HashiCorp/Vagrant/embedded/etc/ssh/sshd_config': Permission denied
RYUTAONO0929 commented 5 years ago
chmod 755 -R /mnt/c

を入力すると大量のエラー文が発生します。 とりあえず、ctrl cで抜けました 全ての文は文字数制限があるためコメントできません。 抜粋ですみません。

konchanxxx commented 5 years ago

なるほど、、、一旦warningは無視しますか。ローカル作業で特に問題ないので:bow: rails g できるようになっていると思うので試してみてください:bow:

RYUTAONO0929 commented 5 years ago

解決したのでしょうか?

ryutaono@DESKTOP-G6D20US:~$ cd taskleaf
ryutaono@DESKTOP-G6D20US:~/taskleaf$ bin/rails g model Task name:string description:text
Running via Spring preloader in process 166
      invoke  active_record
      create    db/migrate/20190221023642_create_tasks.rb
      create    app/models/task.rb
      invoke    test_unit
      create      test/models/task_test.rb
      create      test/fixtures/tasks.yml
ryutaono@DESKTOP-G6D20US:~/taskleaf$
RYUTAONO0929 commented 5 years ago

最後に申し訳ありませんが、お聞きしたいことがあります。 こういったエラーに自分で対応できるためには、どのような勉強が必要なのでしょうか。

konchanxxx commented 5 years ago

解決したのでしょうか?

はいー、問題なく生成できているみたいですね:smile:

最後に申し訳ありませんが、お聞きしたいことがあります。 こういったエラーに自分で対応できるためには、どのような勉強が必要なのでしょうか。

うーん、これは慣れが必要ですが、まずは以下を意識するところから始めれば良いと思います。