WSL Error: Insecure world writable dir x in PATH, mode 040777


#1

Error when running rails generate scaffold car make:string model:string year:integer

a@DESKTOP-HB7BODM:~/projects/odin_on_rails/my_first_rails_app$ rails generate scaffold car make:string model:string year:integer
/home/a/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/a/.rbenv/versions in PATH, mode 040777
Running via Spring preloader in process 3986
invoke active_record
identical db/migrate/20190410082430_create_cars.rb
identical app/models/car.rb
invoke test_unit
identical test/models/car_test.rb
identical test/fixtures/cars.yml
invoke resource_route
route resources :cars
invoke scaffold_controller
identical app/controllers/cars_controller.rb
invoke erb
exist app/views/cars
identical app/views/cars/index.html.erb
identical app/views/cars/edit.html.erb
identical app/views/cars/show.html.erb
identical app/views/cars/new.html.erb
identical app/views/cars/_form.html.erb
invoke test_unit
identical test/controllers/cars_controller_test.rb
identical test/system/cars_test.rb
invoke helper
identical app/helpers/cars_helper.rb
invoke test_unit
invoke jbuilder
identical app/views/cars/index.json.jbuilder
identical app/views/cars/show.json.jbuilder
identical app/views/cars/_car.json.jbuilder
invoke assets
invoke coffee
identical app/assets/javascripts/cars.coffee
invoke scss
identical app/assets/stylesheets/cars.scss
invoke scss
identical app/assets/stylesheets/scaffolds.scss

Same Error when running rails db:migrage

a@DESKTOP-HB7BODM:~/projects/odin_on_rails/my_first_rails_app$ rails db:migrate
/home/a/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/a/.rbenv/versions in PATH, mode 040777
== 20190410082430 CreateCars: migrating =======================================
– create_table(:cars)
-> 0.0022s
== 20190410082430 CreateCars: migrated (0.0034s) ==============================

Altough the rails server is working ok at http://localhost:3000/cars

why this error is shown in term? Insecure world writable dir x in PATH, mode 040777
Should i ignore it?


#2

rails server Terminal Output

a@DESKTOP-HB7BODM:~/projects/odin_on_rails/my_first_rails_app$ rails server
/home/a/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /home/a/.rbenv/versions in PATH, mode 040777
=> Booting Puma
=> Rails 5.2.3 application starting in development
=> Run rails server -h for more startup options
Puma starting in single mode…

  • Version 3.12.1 (ruby 2.6.1-p33), codename: Llamas in Pajamas
  • Min threads: 5, max threads: 5
  • Environment: development
  • Listening on tcp://localhost:3000
    Use Ctrl-C to stop
    Started GET “/cars” for ::1 at 2019-04-10 14:14:08 +0530
    (0.6ms) SELECT “schema_migrations”.“version” FROM “schema_migrations” ORDER BY “schema_migrations”.“version” ASC
    ↳ /home/a/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98
    Processing by CarsController#index as HTML
    Rendering cars/index.html.erb within layouts/application
    Car Load (1.1ms) SELECT “cars”.* FROM “cars”
    ↳ app/views/cars/index.html.erb:16
    Rendered cars/index.html.erb within layouts/application (30.4ms)
    Completed 200 OK in 4895ms (Views: 4795.4ms | ActiveRecord: 1.8ms)

Started GET “/cars/new” for ::1 at 2019-04-10 14:17:42 +0530
Processing by CarsController#new as HTML
Rendering cars/new.html.erb within layouts/application
Rendered cars/_form.html.erb (76.2ms)
Rendered cars/new.html.erb within layouts/application (79.3ms)
Completed 200 OK in 133ms (Views: 114.4ms | ActiveRecord: 4.4ms)

Started POST “/cars” for ::1 at 2019-04-10 14:17:57 +0530
Processing by CarsController#create as HTML
Parameters: {“utf8”=>“✓”, “authenticity_token”=>“ahRDvX03g9VX4mCjyf4OtP2h09IGcxS9lKQcMfblTekUcfDWEbU7s16WU/qEZj1l/UDxFba8G+i8KJHBOeVWog==”, “car”=>{“make”=>“2”, “model”=>“oks”, “year”=>“2”}, “commit”=>“Create Car”}
(0.1ms) begin transaction
↳ app/controllers/cars_controller.rb:30
Car Create (1.4ms) INSERT INTO “cars” (“make”, “model”, “year”, “created_at”, “updated_at”) VALUES (?, ?, ?, ?, ?) [[“make”, “2”], [“model”, “oks”], [“year”, 2], [“created_at”, “2019-04-10 08:47:57.737575”], [“updated_at”, “2019-04-10 08:47:57.737575”]]
↳ app/controllers/cars_controller.rb:30
(62.7ms) commit transaction
↳ app/controllers/cars_controller.rb:30
Redirected to http://localhost:3000/cars/1
Completed 302 Found in 102ms (ActiveRecord: 64.2ms)

Started GET “/cars/1” for ::1 at 2019-04-10 14:17:57 +0530
Processing by CarsController#show as HTML
Parameters: {“id”=>“1”}
Car Load (0.4ms) SELECT “cars”.* FROM “cars” WHERE “cars”.“id” = ? LIMIT ? [[“id”, 1], [“LIMIT”, 1]]
↳ app/controllers/cars_controller.rb:67
Rendering cars/show.html.erb within layouts/application
Rendered cars/show.html.erb within layouts/application (1.2ms)
Completed 200 OK in 52ms (Views: 38.5ms | ActiveRecord: 0.4ms)

Started GET “/cars” for ::1 at 2019-04-10 14:18:12 +0530
Processing by CarsController#index as HTML
Rendering cars/index.html.erb within layouts/application
Car Load (0.3ms) SELECT “cars”.* FROM “cars”
↳ app/views/cars/index.html.erb:16
Rendered cars/index.html.erb within layouts/application (9.6ms)
Completed 200 OK in 54ms (Views: 51.8ms | ActiveRecord: 0.3ms)


#3

It’s a normal WSL warning. You can disregard it.